]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Merge branch 'trac3427' (logging configuration in kea4,kea6,d2)
authorTomek Mrugalski <tomasz@isc.org>
Fri, 8 Aug 2014 16:42:01 +0000 (18:42 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 8 Aug 2014 16:42:01 +0000 (18:42 +0200)
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

1  2 
ChangeLog
configure.ac
src/bin/d2/d_controller.cc
src/bin/d2/tests/d2_process_tests.sh.in
src/bin/dhcp4/kea_controller.cc
src/bin/dhcp4/main.cc
src/bin/dhcp6/kea_controller.cc
src/bin/dhcp6/main.cc
src/bin/keactrl/tests/keactrl_tests.sh.in
src/lib/log/logger_manager.cc
src/lib/log/logger_unittest_support.cc

diff --cc ChangeLog
index ab612f82e1f3f524a4f3debca1c902c5c0171f55,8096b02ddad7f271cf005b075de858425baa7694..11b02f05d8a76b0a6894b7e90c4069ae9a8441e1
+++ 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 e8d2cdb6274443b598b0e7449d922ff8450afee3,3a2207486b064c6328555e5c29e3bd03f9dc3059..81728c202a32e48bbdd0c85d841a144b696f5e8b
@@@ -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], [
Simple merge
index 146e93bc79283351cf882e3f0909312e958464ef,267845ed1f0bb634396c328dcf65e8783df38795..9ab39c3e8319af42066fdaf42b70d245dccdf31a
@@@ -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();
  }
  
Simple merge
index c39cd56afa7eb3e7f4296d12dcd6a5a6ee20b05f,1452f1f15a6c9819a25ca38626daa3d6cd61a7fb..04ba6b8636c94b955df4230085ae6653ff0d0519
@@@ -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();
  }
  
index 272026501bca34aaeb056d4f015d224bcd35d620,b1d3cd78e44fb794bb55d088179875aaf849d851..983f169c34f49683b3c214cb6d28e4149801c46c
@@@ -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);
  
Simple merge
index 2c8a063c2bf3c5ed6deafe4f7954a9d9828e9be9,08653e18c0a9dfeda2159cd9e8fe77a0597ad357..be9316adda178ca7592f28cd71ba7b06a17b0e86
@@@ -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