From: Tomek Mrugalski Date: Fri, 8 Aug 2014 16:42:01 +0000 (+0200) Subject: [master] Merge branch 'trac3427' (logging configuration in kea4,kea6,d2) X-Git-Tag: trac3482_base~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64350f6950e38e19db415ec967363468534142dd;p=thirdparty%2Fkea.git [master] Merge branch 'trac3427' (logging configuration in kea4,kea6,d2) Conflicts: ChangeLog configure.ac src/bin/dhcp4/kea_controller.cc src/bin/dhcp6/kea_controller.cc src/bin/dhcp6/main.cc src/lib/log/logger_manager.cc src/lib/log/logger_unittest_support.cc src/lib/log/logger_unittest_support.h --- 64350f6950e38e19db415ec967363468534142dd diff --cc ChangeLog index ab612f82e1,8096b02dda..11b02f05d8 --- a/ChangeLog +++ b/ChangeLog @@@ -1,60 -1,7 +1,65 @@@ -8xx. [func,doc] tomek ++814. [func,doc] tomek + It is now possible to specify logging parameters in a + configuration file for DHCPv4, DHCPv6 and DHCP-DDNS components. - (Trac #3427, git abcd) ++ (Trac #3427, git 23285903645c36fc35c6866a74c50c74089cd255) ++ +813. [func] tomek + Functions, methods and variables referring to BIND10 were renamed + to Kea. In particular, system variables (B10_LOGGER_ROOT, + B10_LOCKFILE_DIR_FROM_BUILD etc.) were renamed. B10_ prefix was + replaced with KEA_. + (Trac #3417, git 1db8988de6af435fa388dc9c7f909c4a004a01d0) + +812. [doc] tomek + DHCPv6 and DDNS sections in Kea Administrator Reference Manual + has been updated. Usage of keactl has been documented. + (Trac #3468, git 3945fc6211bcadb9bece7147039a6b50ebcf936b) + (Trac #3466, git fa9570d19c73cbe7effc75589b7eb855c411f6a3) + +811. [doc] tmark + Added documentation of message protocol between DHCP servers and the + DHCP-DDNS process. + (Trac #3505, git 6d9aed2f8fe181714e8260493c6cc06e13d0edd0) + +810. [func] stephen + perfdhcp is now installed in sbin as it requires root privilege to run. + The perfdhcp source has been moved to the directory src/bin/perfdhcp. + (Trac #3481, git d101aed6156a993476fa1164f0b0ec8395f5886c) + +809. [func] stephen + sockcreator is no longer built or installed. The code is being retained + in the repository for the moment, but may be deleted at some point in the + future. + (Trac #3480, git 2a55a469dde8fcc053b49e287c30d0906baa91b4) + +808. [func] stephen + Reduced number of startup and shutdown messages in the + DHCP-DDNS process by making some of them debug messages. + (Trac #3479, git bca0bae285de9ce904c0afd21af777dac2edb4e6) + +807. [func] marcin + DHCPv6 server responds to Confirm messages from clients. + (Trac #3269, git 4f43c309a994e30c07f5aa27057552fb195ec284) + +806. [func] marcin + DHCPv4 server processes Requested IP Address option (50). + (Trac #3320, git ad411a177a32bbe6a93f4baf813d985558c99e2f) + +805. [func] stephen + Changed all occurrences of "BIND 10" in message files to "Kea". + (Trac #3416, git e88090b57a75424920d9b96efbf50e3554048828) + +804. [func] marcin + DHCPv4 server supports DHCPINFORM messages from the clients. + (Trac #3390, git 77f8577b1dbb52bdc6deb8bed3eef6ce7abc33fd) + +803. [func] marcin + DHCPv4 server supports responding to directly connected clients on + FreeBSD, NetBSD and OpenBSD using Berkeley Packet Filtering. This + also resolves the problem reported in #3438 that the server doesn't + pick the correct interface to respond to the client and the client + never gets the response from the server. + (Trac #2893, git 9fba39d93b9ece950c4294230984d6315dfa11f6) 802. [doc] tomek, marcin Developer's Guide updated to Change BIND 10 references to Kea. diff --cc configure.ac index e8d2cdb627,3a2207486b..81728c202a --- a/configure.ac +++ b/configure.ac @@@ -1455,8 -1452,13 +1455,9 @@@ AC_CONFIG_FILES([compatcheck/Makefil src/lib/util/threads/Makefile src/lib/util/threads/tests/Makefile src/lib/util/unittests/Makefile - src/Makefile + tools/path_replacer.sh tests/Makefile tests/tools/Makefile - tests/tools/perfdhcp/Makefile - tests/tools/perfdhcp/tests/Makefile - tests/tools/perfdhcp/tests/testdata/Makefile ]) AC_CONFIG_COMMANDS([permissions], [ diff --cc src/bin/dhcp4/kea_controller.cc index 146e93bc79,267845ed1f..9ab39c3e83 --- a/src/bin/dhcp4/kea_controller.cc +++ b/src/bin/dhcp4/kea_controller.cc @@@ -170,13 -181,13 +181,13 @@@ void ControlledDhcpv4Srv::cleanup() /// This is a logger initialization for JSON file backend. /// For now, it's just setting log messages to be printed on stdout. /// @todo: Implement this properly (see #3427) - void Daemon::loggerInit(const char*, bool verbose) { + void Daemon::loggerInit(const char* logger_name, bool verbose) { - setenv("B10_LOCKFILE_DIR_FROM_BUILD", "/tmp", 1); - setenv("B10_LOGGER_ROOT", logger_name, 0); - setenv("B10_LOGGER_SEVERITY", (verbose ? "DEBUG":"INFO"), 0); - setenv("B10_LOGGER_DBGLEVEL", "99", 0); - setenv("B10_LOGGER_DESTINATION", "stdout", 0); + setenv("KEA_LOCKFILE_DIR_FROM_BUILD", "/tmp", 1); - setenv("KEA_LOGGER_ROOT", "kea", 0); ++ setenv("KEA_LOGGER_ROOT", logger_name, 0); + setenv("KEA_LOGGER_SEVERITY", (verbose ? "DEBUG":"INFO"), 0); + setenv("KEA_LOGGER_DBGLEVEL", "99", 0); + setenv("KEA_LOGGER_DESTINATION", "stdout", 0); isc::log::initLogger(); } diff --cc src/bin/dhcp6/kea_controller.cc index c39cd56afa,1452f1f15a..04ba6b8636 --- a/src/bin/dhcp6/kea_controller.cc +++ b/src/bin/dhcp6/kea_controller.cc @@@ -172,13 -181,13 +181,13 @@@ void ControlledDhcpv6Srv::cleanup() /// This is a logger initialization for JSON file backend. /// For now, it's just setting log messages to be printed on stdout. /// @todo: Implement this properly (see #3427) - void Daemon::loggerInit(const char*, bool verbose) { + void Daemon::loggerInit(const char* logger_name, bool verbose) { - setenv("B10_LOCKFILE_DIR_FROM_BUILD", "/tmp", 1); - setenv("B10_LOGGER_ROOT", logger_name, 0); - setenv("B10_LOGGER_SEVERITY", (verbose ? "DEBUG":"INFO"), 0); - setenv("B10_LOGGER_DBGLEVEL", "99", 0); - setenv("B10_LOGGER_DESTINATION", "stdout", 0); + setenv("KEA_LOCKFILE_DIR_FROM_BUILD", "/tmp", 1); - setenv("KEA_LOGGER_ROOT", "kea", 0); ++ setenv("KEA_LOGGER_ROOT", logger_name, 0); + setenv("KEA_LOGGER_SEVERITY", (verbose ? "DEBUG":"INFO"), 0); + setenv("KEA_LOGGER_DBGLEVEL", "99", 0); + setenv("KEA_LOGGER_DESTINATION", "stdout", 0); isc::log::initLogger(); } diff --cc src/bin/dhcp6/main.cc index 272026501b,b1d3cd78e4..983f169c34 --- a/src/bin/dhcp6/main.cc +++ b/src/bin/dhcp6/main.cc @@@ -117,9 -111,12 +117,12 @@@ main(int argc, char* argv[]) // Create the server instance. ControlledDhcpv6Srv server(port_number); + // Remember verbose-mode + server.setVerbose(verbose_mode); + try { - // Initialize the server, i.e. establish control session - // if BIND10 backend is used or read a configuration file + // Initialize the server, e.g. establish control session + // if Bundy backend is used or read a configuration file // if Kea backend is used. server.init(config_file); diff --cc src/lib/log/logger_unittest_support.cc index 2c8a063c2b,08653e18c0..be9316adda --- a/src/lib/log/logger_unittest_support.cc +++ b/src/lib/log/logger_unittest_support.cc @@@ -149,12 -149,11 +149,13 @@@ resetUnitTestRootLogger() // Logger Run-Time Initialization via Environment Variables void initLogger(isc::log::Severity severity, int dbglevel) { - // Root logger name is defined by the environment variable B10_LOGGER_ROOT. - const char* root = getenv("B10_LOGGER_ROOT"); + // Root logger name is defined by the environment variable KEA_LOGGER_ROOT. + // If not present, the name is "kea". + const char* DEFAULT_ROOT = "kea"; + const char* root = getenv("KEA_LOGGER_ROOT"); if (! root) { - root = DEFAULT_ROOT; + // If not present, the name is "kea". + root = isc::log::getDefaultRootLoggerName().c_str(); } // Set the local message file