Browse Source

[3074] Add logging

Mukund Sivaraman 11 years ago
parent
commit
2115ed0bef
2 changed files with 11 additions and 3 deletions
  1. 8 3
      src/bin/bind10/init.py.in
  2. 3 0
      src/bin/bind10/init_messages.mes

+ 8 - 3
src/bin/bind10/init.py.in

@@ -765,9 +765,14 @@ class Init:
         it might want to choose if it is for this one).
         it might want to choose if it is for this one).
         """
         """
         logger.info(BIND10_STOP_PROCESS, process)
         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):
     def component_shutdown(self, exitcode=0):
         """
         """

+ 3 - 0
src/bin/bind10/init_messages.mes

@@ -329,3 +329,6 @@ ten seconds.
 % BIND10_RECONFIGURE_ERROR Error applying new config: %1
 % BIND10_RECONFIGURE_ERROR Error applying new config: %1
 A new configuration was received, but there was an error doing the
 A new configuration was received, but there was an error doing the
 re-configuration.
 re-configuration.
+
+% BIND10_COMPONENT_SHUTDOWN_ERROR An error occured stopping component %1
+An attempt to gracefully shutdown a component failed.