[svn] commit: r3078 - in /branches/trac335/src/bin: bind10/bind10.py.in xfrin/xfrin.py.in

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Sep 30 05:03:58 UTC 2010


Author: zhanglikun
Date: Thu Sep 30 05:03:58 2010
New Revision: 3078

Log:
1. catch the exception when xfrin sending the zone transfer result to others modules, msgq may has been killed at that time. 2. change the delay time of boss process between sending command 'shutdown' and signal 'SIGTERM'.

Modified:
    branches/trac335/src/bin/bind10/bind10.py.in
    branches/trac335/src/bin/xfrin/xfrin.py.in

Modified: branches/trac335/src/bin/bind10/bind10.py.in
==============================================================================
--- branches/trac335/src/bin/bind10/bind10.py.in (original)
+++ branches/trac335/src/bin/bind10/bind10.py.in Thu Sep 30 05:03:58 2010
@@ -471,6 +471,8 @@
         except:
             pass
         # XXX: some delay probably useful... how much is uncertain
+        # I have changed the delay from 0.5 to 1, but sometime it's 
+        # still not enough.
         time.sleep(1)  
         self.reap_children()
         # next try sending a SIGTERM

Modified: branches/trac335/src/bin/xfrin/xfrin.py.in
==============================================================================
--- branches/trac335/src/bin/xfrin/xfrin.py.in (original)
+++ branches/trac335/src/bin/xfrin/xfrin.py.in Thu Sep 30 05:03:58 2010
@@ -510,11 +510,19 @@
         param = {'zone_name': zone_name, 'zone_class': zone_class.to_text()}
         if xfr_result == XFRIN_OK:
             msg = create_command(notify_out.ZONE_NEW_DATA_READY_CMD, param)
-            self._send_cc_session.group_sendmsg(msg, XFROUT_MODULE_NAME)
-            self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
+            # catch the exception, in case msgq has been killed.
+            try:
+                self._send_cc_session.group_sendmsg(msg, XFROUT_MODULE_NAME)
+                self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
+            except: 
+                pass
         else:
             msg = create_command(ZONE_XFRIN_FAILED, param)
-            self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
+            # catch the exception, in case msgq has been killed.
+            try:
+                self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
+            except:
+                pass
 
     def startup(self):
         while not self._shutdown_event.is_set():




More information about the bind10-changes mailing list