BIND 10 master, updated. ed672a898d28d6249ff0c96df12384b0aee403c8 Merge branch 'trac3074'

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Oct 24 08:41:09 UTC 2013


The branch, master has been updated
       via  ed672a898d28d6249ff0c96df12384b0aee403c8 (commit)
       via  3cbdec67c78ea16cf26742a3865046332774d2d7 (commit)
       via  f3f429b0e05eac677146e0419b50bc7704d1eb73 (commit)
       via  8e5d94583bc9da8374341509fbf0260d7a53edc2 (commit)
       via  33a9204a11501ee3289161543e5abcacf042a504 (commit)
       via  2115ed0befc5e58bc17960bfb89f5d209c2f9d71 (commit)
       via  dab092748d4083472373516cd4d576b0158aceeb (commit)
      from  ea8ba75f55dceb13773d98a5836d075e231b2b6f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ed672a898d28d6249ff0c96df12384b0aee403c8
Merge: 3cbdec6 8e5d945
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Oct 24 12:18:49 2013 +0530

    Merge branch 'trac3074'

commit 3cbdec67c78ea16cf26742a3865046332774d2d7
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Oct 24 12:18:00 2013 +0530

    [master] Fix typo

commit f3f429b0e05eac677146e0419b50bc7704d1eb73
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Oct 24 12:17:48 2013 +0530

    [master] Delete trailing space

-----------------------------------------------------------------------

Summary of changes:
 src/bin/auth/query.cc                 |    2 +-
 src/bin/bind10/init.py.in             |   19 ++++++++++++++++---
 src/bin/bind10/init_messages.mes      |    7 +++++++
 src/bin/msgq/msgq.py.in               |    4 +++-
 src/bin/msgq/msgq_messages.mes        |    6 ++++++
 src/lib/datasrc/memory/zone_finder.cc |    2 +-
 6 files changed, 34 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/query.cc b/src/bin/auth/query.cc
index 65e5410..87f8e91 100644
--- a/src/bin/auth/query.cc
+++ b/src/bin/auth/query.cc
@@ -255,7 +255,7 @@ Query::addWildcardNXRRSETProof(ZoneFinder& finder, ConstRRsetPtr nsec) {
     if (nsec->getRdataCount() == 0) {
         isc_throw(BadNSEC, "NSEC for WILDCARD_NXRRSET is empty");
     }
-    
+
     ConstZoneFinderContextPtr fcontext =
         finder.find(*qname_, RRType::NSEC(),
                     dnssec_opt_ | ZoneFinder::NO_WILDCARD);
diff --git a/src/bin/bind10/init.py.in b/src/bin/bind10/init.py.in
index df69a34..cb1847d 100755
--- a/src/bin/bind10/init.py.in
+++ b/src/bin/bind10/init.py.in
@@ -337,6 +337,7 @@ class Init:
                 self.__propagate_component_config(new_config['components'])
             return isc.config.ccsession.create_answer(0)
         except Exception as e:
+            logger.error(BIND10_RECONFIGURE_ERROR, e)
             return isc.config.ccsession.create_answer(1, str(e))
 
     def get_processes(self):
@@ -597,6 +598,13 @@ class Init:
             process, the log_starting/log_started methods are not used.
         """
         logger.info(BIND10_STARTING_CC)
+
+        # Unsubscribe from the other CC session first, because we only
+        # monitor one and msgq expects all data sent to us to be read,
+        # or it will close its side of the socket.
+        if self.cc_session is not None:
+            self.cc_session.group_unsubscribe("Init")
+
         self.ccs = isc.config.ModuleCCSession(SPECFILE_LOCATION,
                                       self.config_handler,
                                       self.command_handler,
@@ -764,9 +772,14 @@ class Init:
         it might want to choose if it is for this one).
         """
         logger.info(BIND10_STOP_PROCESS, process)
-        self.cc_session.group_sendmsg(isc.config.ccsession.
-                                      create_command('shutdown', {'pid': pid}),
-                                      recipient, recipient)
+        try:
+            self.cc_session.group_sendmsg(isc.config.ccsession.
+                                          create_command('shutdown',
+                                                         {'pid': pid}),
+                                          recipient, recipient)
+        except:
+            logger.error(BIND10_COMPONENT_SHUTDOWN_ERROR, process)
+            raise
 
     def component_shutdown(self, exitcode=0):
         """
diff --git a/src/bin/bind10/init_messages.mes b/src/bin/bind10/init_messages.mes
index 267790d..21cd142 100644
--- a/src/bin/bind10/init_messages.mes
+++ b/src/bin/bind10/init_messages.mes
@@ -325,3 +325,10 @@ the configuration manager to start up.  The total length of time Init
 will wait for the configuration manager before reporting an error is
 set with the command line --wait switch, which has a default value of
 ten seconds.
+
+% BIND10_RECONFIGURE_ERROR Error applying new config: %1
+A new configuration was received, but there was an error doing the
+re-configuration.
+
+% BIND10_COMPONENT_SHUTDOWN_ERROR An error occured stopping component %1
+An attempt to gracefully shutdown a component failed.
diff --git a/src/bin/msgq/msgq.py.in b/src/bin/msgq/msgq.py.in
index 765d19f..07ea5ba 100755
--- a/src/bin/msgq/msgq.py.in
+++ b/src/bin/msgq/msgq.py.in
@@ -525,7 +525,9 @@ class MsgQ:
             # Append it to buffer (but check the data go away)
             if fileno in self.sendbuffs:
                 (last_sent, buff) = self.sendbuffs[fileno]
-                if now - last_sent > 0.1:
+                tdelta = now - last_sent
+                if tdelta > 0.1:
+                    logger.error(MSGQ_SOCKET_TIMEOUT_ERROR, fileno, tdelta)
                     self.kill_socket(fileno, sock)
                     return False
                 buff += msg
diff --git a/src/bin/msgq/msgq_messages.mes b/src/bin/msgq/msgq_messages.mes
index 909d6a3..2bd2515 100644
--- a/src/bin/msgq/msgq_messages.mes
+++ b/src/bin/msgq/msgq_messages.mes
@@ -142,3 +142,9 @@ data structure.
 % MSGQ_SUBS_NEW_TARGET Creating new target for subscription to group '%1' for instance '%2'
 Debug message. Creating a new subscription. Also creating a new data structure
 to hold it.
+
+% MSGQ_SOCKET_TIMEOUT_ERROR Killing socket %1 because timeout exceeded (%2)
+Outgoing data was queued up on a socket connected to msgq, but the other
+side is not reading it. It could be deadlocked, or may not be monitoring
+it. Both cases are programming errors and should be corrected. The socket
+is closed on the msgq side.
diff --git a/src/lib/datasrc/memory/zone_finder.cc b/src/lib/datasrc/memory/zone_finder.cc
index 3f61b89..a6c601b 100644
--- a/src/lib/datasrc/memory/zone_finder.cc
+++ b/src/lib/datasrc/memory/zone_finder.cc
@@ -772,7 +772,7 @@ InMemoryZoneFinder::findAll(const isc::dns::Name& name,
 // the case of CNAME can be eliminated (these should be guaranteed at the load
 // or update time, but even if they miss a corner case and allows a CNAME to
 // be added at origin, the zone is broken anyway, so we'd just let this
-// method return garbage, too).  As a result, there can be only too cases
+// method return garbage, too).  As a result, there can be only two cases
 // for the result codes: SUCCESS if the requested type of RR exists; NXRRSET
 // otherwise.  Due to its simplicity we implement it separately, rather than
 // sharing the code with findInternal.



More information about the bind10-changes mailing list