Commit d425c142 authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[4316] Changed primary lease event logging from DEBUG to INFO

src/bin/dhcp4/dhcp4_messages.mes
    - Replaced the word "debug" with "informational" where appropriate

src/bin/dhcp4/dhcp4_srv.cc
    - Changed several lease4_logger messages from DEBUG to INFO
    DHCP4_INIT_REBOOT
    DHCP4_LEASE_ADVERT
    DHCP4_LEASE_ALLOC
    DHCP4_RELEASE
    DHCP4_DECLINE_LEASE

src/bin/dhcp6/dhcp6_messages.mes
    - Replaced the word "debug" with "informational" where appropriate

    - Added two new messages:
    DHCP6_LEASE_RENEW
    DHCP6_PD_LEASE_RENEW

src/bin/dhcp6/dhcp6_srv.cc
    - Changed several lease6_logger messages from DEBUG to INFO
    DHCP6_LEASE_ADVERT
    DHCP6_LEASE_ALLOC
    DHCP6_PD_LEASE_ADVERT
    DHCP6_PD_LEASE_ALLOC
    DHCP6_RELEASE_NA
    DHCP6_RELEASE_PD
    DHCP6_DECLINE_LEASE

    - Dhcpv6Srv::extendIA_NA() - added new log for DHCP6_LEASE_RENEW
    - Dhcpv6Srv::extendIA_PD() - added new log for DHCP6_PD_LEASE_RENEW
parent e1beae1b
......@@ -293,24 +293,24 @@ was not successful, or it encountered any other critical error on startup.
Attached error message provides more details about the issue.
% DHCP4_INIT_REBOOT %1: client is in INIT-REBOOT state and requests address %2
This debug message is issued when the client is in the INIT-REBOOT state and
is requesting an IPv4 address it is using to be allocated for it. The first
argument includes the client and transaction identification information. The
second argument specifies the requested IPv4 address.
This informational message is issued when the client is in the INIT-REBOOT
state and is requesting an IPv4 address it is using to be allocated for it.
The first argument includes the client and transaction identification
information. The second argument specifies the requested IPv4 address.
% DHCP4_LEASE_ADVERT %1: lease %2 will be advertised
This debug message indicates that the server has found the lease to be
This informational message indicates that the server has found the lease to be
offered to the client. It is up to the client to choose one server out of
those which offered leases and continue allocation with that server.
The first argument specifies the client and the transaction identification
information. The second argument specifies the IPv4 address to be offered.
% DHCP4_LEASE_ALLOC %1: lease %2 has been allocated
This debug message indicates that the server successfully granted a lease
in response to client's DHCPREQUEST message. The lease information will
be sent to the client in the DHCPACK message. The first argument
contains the client and the transaction identification information. The
second argument contains the allocated IPv4 address.
This informational message indicates that the server successfully granted a
lease in response to client's DHCPREQUEST message. The lease information will
be sent to the client in the DHCPACK message. The first argument contains the
client and the transaction identification information. The second argument
contains the allocated IPv4 address.
% DHCP4_NAME_GEN_UPDATE_FAIL %1: failed to update the lease after generating name %2 for a client: %3
This message indicates the failure when trying to update the lease and/or
......@@ -527,7 +527,7 @@ argument includes the client and the transaction identification
information.
% DHCP4_RELEASE %1: address %2 was released properly.
This debug message indicates that an address was released properly. It
This informational message indicates that an address was released properly. It
is a normal operation during client shutdown. The first argument includes
the client and transaction identification information. The second argument
includes the released IPv4 address.
......
......@@ -1297,7 +1297,7 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) {
// and whether the client is known, i.e., has a lease.
if (!fake_allocation && !opt_serverid && opt_requested_address) {
LOG_DEBUG(lease4_logger, DBG_DHCP4_DETAIL, DHCP4_INIT_REBOOT)
LOG_INFO(lease4_logger, DHCP4_INIT_REBOOT)
.arg(query->getLabel())
.arg(hint.toText());
......@@ -1384,8 +1384,7 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) {
if (lease) {
// We have a lease! Let's set it in the packet and send it back to
// the client.
LOG_DEBUG(lease4_logger, DBG_DHCP4_BASIC_DATA, fake_allocation?
DHCP4_LEASE_ADVERT : DHCP4_LEASE_ALLOC)
LOG_INFO(lease4_logger, fake_allocation ? DHCP4_LEASE_ADVERT : DHCP4_LEASE_ALLOC)
.arg(query->getLabel())
.arg(lease->addr_.toText());
......@@ -1842,7 +1841,7 @@ Dhcpv4Srv::processRelease(Pkt4Ptr& release) {
if (success) {
// Release successful
LOG_DEBUG(lease4_logger, DBG_DHCP4_DETAIL, DHCP4_RELEASE)
LOG_INFO(lease4_logger, DHCP4_RELEASE)
.arg(release->getLabel())
.arg(lease->addr_.toText());
......@@ -2004,7 +2003,7 @@ Dhcpv4Srv::declineLease(const Lease4Ptr& lease, const Pkt4Ptr& decline) {
LeaseMgrFactory::instance().updateLease4(lease);
LOG_INFO(dhcp4_logger, DHCP4_DECLINE_LEASE).arg(lease->addr_.toText())
LOG_INFO(lease4_logger, DHCP4_DECLINE_LEASE).arg(lease->addr_.toText())
.arg(decline->getLabel()).arg(lease->valid_lft_);
}
......
......@@ -327,7 +327,7 @@ issue that prevents it from starting up properly. Attached error message
provides more details about the issue.
% DHCP6_LEASE_ADVERT %1: lease for address %2 and iaid=%3 will be advertised
This debug message indicates that the server will advertise an
This informational message indicates that the server will advertise an
address to the client in the ADVERTISE message. The client will
request allocation of this address with the REQUEST message sent
in the next message exchange. The first argument includes the client
......@@ -342,8 +342,8 @@ log entry. The first argument holds the client and transaction identification
information. The second argument holds the IAID.
% DHCP6_LEASE_ALLOC %1: lease for address %2 and iaid=%3 has been allocated
This debug message indicates that in response to a client's REQUEST
message, the server successfully granted an non-temporary address
This informational message indicates that in response to a client's REQUEST
message, the server successfully granted a non-temporary address
lease. This is a normal behavior and indicates successful operation.
The first argument includes the client and transaction identification
information. The remaining arguments hold the allocated address and
......@@ -356,6 +356,14 @@ be many reasons for such failure. Each failure is logged in a separate
log entry. The first argument holds the client and transaction identification
information. The second argument holds the IAID.
% DHCP6_LEASE_RENEW %1: lease for address %2 and iaid=%3 has been allocated
This informational message indicates that in response to a client's REQUEST
message, the server successfully renewed a non-temporary address
lease. This is a normal behavior and indicates successful operation.
The first argument includes the client and transaction identification
information. The remaining arguments hold the allocated address and
IAID.
% DHCP6_LEASE_DATA %1: detailed lease information for iaid=%2: %3
This debug message is used to print the detailed information about the
allocated lease or a lease which will be advertised to the client.
......@@ -489,7 +497,7 @@ parsing actions and committal of changes failed. The reason for the
failure is given in the message.
% DHCP6_PD_LEASE_ADVERT %1: lease for prefix %2/%3 and iaid=%4 will be advertised
This debug message indicates that the server will advertise a
This informational message indicates that the server will advertise a
prefix to the client in the ADVERTISE message. The client will
request allocation of this prefix with the REQUEST message sent
in the next message exchange. The first argument includes the client
......@@ -504,9 +512,9 @@ log entry. The first argument holds the client and transaction identification
information. The second argument holds the IAID.
% DHCP6_PD_LEASE_ALLOC %1: lease for prefix %2/%3 and iaid=%4 has been allocated
This debug message indicates that in response to a client's REQUEST
message, the server successfully granted an non-temporary address
lease. This is a normal behavior and indicates successful operation.
This informational message indicates that in response to a client's REQUEST
message, the server successfully granted a prefix lease.
This is a normal behavior and indicates successful operation.
The first argument includes the client and transaction identification
information. The remaining arguments hold the allocated prefix,
prefix length and and IAID.
......@@ -518,6 +526,14 @@ for such failure. Each failure is logged in a separate log entry. The first
argument holds the client and transaction identification information.
The second argument holds the IAID.
% DHCP6_PD_LEASE_RENEW %1: lease for prefix %2/%3 and iaid=%4 has been allocated
This informational message indicates that in response to a client's REQUEST
message, the server successfully renewed a prefix lease.
This is a normal behavior and indicates successful operation.
The first argument includes the client and transaction identification
information. The remaining arguments hold the allocated prefix,
prefix length and and IAID.
% DHCP6_PROCESS_IA_NA_EXTEND %1: extending lease lifetime for IA_NA option with iaid=%2
This message is logged when the server is starting to extend the lifetime
of the address lease associated with the particular IAID. The first argument
......@@ -566,7 +582,7 @@ server for the subnet on which the client is connected. The argument
specifies the client and transaction identification information.
% DHCP6_RELEASE_NA %1: binding for address %2 and iaid=%3 was released properly
This debug message indicates that an address was released properly. It
This informational message indicates that an address was released properly. It
is a normal operation during client shutdown.
% DHCP6_RELEASE_NA_FAIL %1: failed to remove address lease for address %2 and iaid=%3
......@@ -594,7 +610,7 @@ IA (identity association) container. This probably means that the client's
support for multiple addresses is flawed.
% DHCP6_RELEASE_PD %1: prefix %2/%3 for iaid=%4 was released properly
This debug message indicates that a prefix was released properly. It
This informational message indicates that a prefix was released properly. It
is a normal operation during client shutdown. The first argument holds
the client and transaction identification information. The second and
third argument define the prefix and its length. The fourth argument
......
......@@ -1316,8 +1316,7 @@ Dhcpv6Srv::assignIA_NA(const Pkt6Ptr& query, const Pkt6Ptr& answer,
if (lease) {
// We have a lease! Let's wrap its content into IA_NA option
// with IAADDR suboption.
LOG_DEBUG(lease6_logger, DBG_DHCP6_DETAIL, fake_allocation ?
DHCP6_LEASE_ADVERT : DHCP6_LEASE_ALLOC)
LOG_INFO(lease6_logger, fake_allocation ? DHCP6_LEASE_ADVERT : DHCP6_LEASE_ALLOC)
.arg(query->getLabel())
.arg(lease->addr_.toText())
.arg(ia->getIAID());
......@@ -1434,7 +1433,7 @@ Dhcpv6Srv::assignIA_PD(const Pkt6Ptr& query, const Pkt6Ptr& answer,
// We have a lease! Let's wrap its content into IA_PD option
// with IAADDR suboption.
LOG_DEBUG(lease6_logger, DBG_DHCP6_DETAIL, fake_allocation ?
LOG_INFO(lease6_logger, fake_allocation ?
DHCP6_PD_LEASE_ADVERT : DHCP6_PD_LEASE_ALLOC)
.arg(query->getLabel())
.arg((*l)->addr_.toText())
......@@ -1558,6 +1557,10 @@ Dhcpv6Srv::extendIA_NA(const Pkt6Ptr& query, const Pkt6Ptr& answer,
Option6IAAddrPtr iaaddr(new Option6IAAddr(D6O_IAADDR,
(*l)->addr_, (*l)->preferred_lft_, (*l)->valid_lft_));
ia_rsp->addOption(iaaddr);
LOG_INFO(lease6_logger, DHCP6_LEASE_RENEW)
.arg(query->getLabel())
.arg((*l)->addr_.toText())
.arg(ia_rsp->getIAID());
// Now remove this address from the hints list.
AllocEngine::HintType tmp((*l)->addr_, 128);
......@@ -1714,6 +1717,11 @@ Dhcpv6Srv::extendIA_PD(const Pkt6Ptr& query,
(*l)->addr_, (*l)->prefixlen_,
(*l)->preferred_lft_, (*l)->valid_lft_));
ia_rsp->addOption(prf);
LOG_INFO(lease6_logger, DHCP6_PD_LEASE_RENEW)
.arg(query->getLabel())
.arg((*l)->addr_.toText())
.arg(static_cast<int>((*l)->prefixlen_))
.arg(ia->getIAID());
// Now remove this address from the hints list.
AllocEngine::HintType tmp((*l)->addr_, (*l)->prefixlen_);
......@@ -1988,7 +1996,7 @@ Dhcpv6Srv::releaseIA_NA(const DuidPtr& duid, const Pkt6Ptr& query,
return (ia_rsp);
} else {
LOG_DEBUG(lease6_logger, DBG_DHCP6_DETAIL, DHCP6_RELEASE_NA)
LOG_INFO(lease6_logger, DHCP6_RELEASE_NA)
.arg(query->getLabel())
.arg(lease->addr_.toText())
.arg(lease->iaid_);
......@@ -2143,7 +2151,7 @@ Dhcpv6Srv::releaseIA_PD(const DuidPtr& duid, const Pkt6Ptr& query,
general_status = STATUS_UnspecFail;
} else {
LOG_DEBUG(lease6_logger, DBG_DHCP6_DETAIL, DHCP6_RELEASE_PD)
LOG_INFO(lease6_logger, DHCP6_RELEASE_PD)
.arg(query->getLabel())
.arg(lease->addr_.toText())
.arg(static_cast<int>(lease->prefixlen_))
......@@ -2664,7 +2672,7 @@ Dhcpv6Srv::declineLease(const Pkt6Ptr& decline, const Lease6Ptr lease,
lease->decline(CfgMgr::instance().getCurrentCfg()->getDeclinePeriod());
LeaseMgrFactory::instance().updateLease6(lease);
LOG_INFO(dhcp6_logger, DHCP6_DECLINE_LEASE).arg(decline->getLabel())
LOG_INFO(lease6_logger, DHCP6_DECLINE_LEASE).arg(decline->getLabel())
.arg(lease->addr_.toText()).arg(lease->valid_lft_);
ia_rsp->addOption(createStatusCode(*decline, *ia_rsp, STATUS_Success,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment