]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Merge branch 'trac3591' (logging lockfile fix)
authorTomek Mrugalski <tomasz@isc.org>
Thu, 25 Sep 2014 10:41:51 +0000 (12:41 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Thu, 25 Sep 2014 10:41:51 +0000 (12:41 +0200)
Conflicts:
ChangeLog
Makefile.am
src/lib/dhcpsrv/daemon.cc

1  2 
ChangeLog
Makefile.am
doc/guide/logging.xml
src/bin/d2/d_controller.cc
src/bin/dhcp4/bundy_controller.cc
src/bin/dhcp4/kea_controller.cc
src/bin/dhcp6/kea_controller.cc
src/lib/dhcpsrv/daemon.cc
src/lib/dhcpsrv/daemon.h
src/lib/dhcpsrv/logging.cc
src/lib/dhcpsrv/logging.h

diff --cc ChangeLog
index 58cd280bd10b0f046c4008e8e255084d5793622e,d7d3a3d7f57104984e3e2a7e79f70dd99f447ea1..36aca789d9b5d46256659f93afd39ae4f42b169e
+++ b/ChangeLog
@@@ -1,31 -1,8 +1,37 @@@
 -8xx.  [bug]           tomek
++838.  [bug]           tomek
+       Kea components now use the KEA_LOCKFILE_DIR environment variable
+       to specify the directory of the logging lockfile. Locking can be
+       disabled completely by setting the variable to 'none'.
 -      (Trac #3591, git tbd)
++      (Trac #3591, git d4556e1d21766b94f2f0cda59df15e47e6f2676e)
++
 +837.  [bug,doc]       tomek
 +      Logging configuration examples in kea.conf fixed. Also updated
 +      Kea documentation for logging.
 +      (Trac #3536, git 2cf3f6b9cb3d2ae6fc7b0940b55490f109ddd2f9)
 +
 +836.  [bug]           fdupont
 +      Moved duplicated getXXXHashAlgorithm() function to new
 +      xxx_common.h include files in the cryptolink library.
 +      (Trac #3471, git 8cf2ee46b3d7398f4f716435be3d9b19bf3599f5)
 +
 +835.  [build]         fdupont
 +      The configure script checks if OpenSSL supports SHA-2, in order
 +      to avoid very old (and likely subject to unfixed security bugs)
 +      OpenSSL versions.
 +      (Trac #3482, git c779a0ef23d2092cf896276dab1fbcb190380374)
 +
 +834.  [bug]           marcin
 +      Corrected the definition of the example DHCPv4 and DHCPv6 address
 +      pools in the default kea.conf file.
 +      (Trac #3538, git 8712cc0df77368940d8d3d11811a9ac9504bce12)
 +
 +833.  [func]          marcin
 +      Configuration Manager supports two stage configuration. In the
 +      first stage a temporary configuration is created and in the
 +      second stage this configuration is committed. If configuration
 +      fails at the first stage, the temporary configuration is rolled
 +      back and the server continues to use the old configuration.
 +      (Trac #3534, git 4ecee3c0c97fe417b050317356f9093ba3771a15)
  
  Kea 0.9 released on August 29, 2014
  
diff --cc Makefile.am
index ea0d5786bd5a912ea2524455878addde7c619d62,b943445b9861773d086bcf112c55c8ed1057dbf2..69f7958723385c2eae524151aae46e37131675ba
@@@ -121,7 -121,7 +121,8 @@@ cppcheck
  
  # These steps are necessary during installation
  install-exec-hook:
 +      mkdir -p $(DESTDIR)${localstatedir}/log/
+       mkdir -p $(DESTDIR)${localstatedir}/run/${PACKAGE_NAME}
  
  ### include tool to generate documentation from log message specifications
  ### in the distributed tarball:
index cfa2f8b862bcc754af3cc54e872b593057ea7054,7e54f1e7c32610aa442455a2eeff1c7c8dcfb60d..60a2846a35c95be494e18c35fcf111cf92b0f457
      <title>Logging</title>
  
      <section>
-       <title>Logging configuration</title>
+       <title>Logging Configuration</title>
  
        <para>
 +        During its operation Kea may produce many messages. They differ in
 +        severity (some are more important than others) and source (some are
 +        produced by specific components, e.g. hooks). It is useful to understand
 +        which log messages are needed and which are not and configure your
 +        logging appropriately. For example, debug level messages can be safely
 +        ignored in a typical deployment. They are, however, very useful when
 +        debugging a problem.
 +      </para>
  
 +      <para>
          The logging system in Kea is configured through the
 -        Logging module. All  modules will look at the
 -        configuration in Logging to see what should be logged and
 -        to where.
 -
 -<!-- TODO: what is context of Logging module for readers of this guide? -->
 -
 +        <replaceable>Logging</replaceable> structure in your configuration
 +        file. All daemons (e.g. DHCPv4 and DHCPv6 servers) will use the
 +        configuration in the <replaceable>Logging</replaceable> structure to see
 +        what should be logged and to where. This allows for sharing identical
 +        logging configuration between daemons.
        </para>
  
        <section>
Simple merge
Simple merge
Simple merge
Simple merge
index bacd79947b0ee7671cf497d204839891d88f8f7a,147b2f76741efc2c98d5b97dbcd786b672a3a403..ffe3ad0c94fe094a0b35d80301dcb85ebed89969
@@@ -57,26 -58,50 +59,36 @@@ void Daemon::handleSignal() 
  }
  
  void Daemon::configureLogger(const isc::data::ConstElementPtr& log_config,
 -                             const ConfigurationPtr& storage,
 -                             bool verbose) {
 -
 -    if (!log_config) {
 -        // There was no logger configuration. Let's clear any config
 -        // and revert to the default.
 -
 -        isc::log::setDefaultLoggingOutput(verbose); // Set up default logging
 -        return;
 -    }
 -
 -    isc::data::ConstElementPtr loggers = log_config->get("loggers");
 -    if (!loggers) {
 -        // There is Logging structure, but it doesn't have loggers
 -        // array in it. Let's clear any old logging configuration
 -        // we may have and revert to the default.
 -
 -        isc::log::setDefaultLoggingOutput(verbose); // Set up default logging
 -        return;
 +                             const SrvConfigPtr& storage) {
 +
 +    if (log_config) {
 +        isc::data::ConstElementPtr loggers = log_config->get("loggers");
 +        if (loggers) {
 +            LogConfigParser parser(storage);
 +            parser.parseConfiguration(loggers, CfgMgr::instance().isVerbose());
 +        }
      }
 +}
  
 -    // This is utility class that translates JSON structures into formats
 -    // understandable by log4cplus.
 -    LogConfigParser parser(storage);
 -
 -    // Translate JSON structures into log4cplus formats
 -    parser.parseConfiguration(loggers, verbose);
 -
 -    // Apply the configuration
 +void
 +Daemon::setVerbose(bool verbose) {
 +    CfgMgr::instance().setVerbose(verbose);
 +}
  
 -    /// @todo: Once configuration unrolling is implemented,
 -    /// this call will be moved to a separate method.
 -    parser.applyConfiguration();
 +bool
 +Daemon::getVerbose() const {
 +    return (CfgMgr::instance().isVerbose());
  }
  
+ void Daemon::loggerInit(const char* name, bool verbose) {
+     // Initialize logger system
+     isc::log::initLogger(name, isc::log::DEBUG, isc::log::MAX_DEBUG_LEVEL,
+                          NULL);
+     // Apply default configuration (log INFO or DEBUG to stdout)
+     isc::log::setDefaultLoggingOutput(verbose);
+ }
  };
  };
Simple merge
Simple merge
Simple merge