Parcourir la source

[213] Some more logging

Michal 'vorner' Vaner il y a 13 ans
Parent
commit
1d9614bc52

+ 5 - 0
src/bin/bind10/bind10_messages.mes

@@ -118,6 +118,11 @@ While listening on the message bus channel for messages, it suddenly
 disappeared. The msgq daemon may have died. This might lead to an
 inconsistent state of the system, and BIND 10 will now shut down.
 
+% BIND10_PROCESS_ENDED process %2 of %1 ended with status %3
+This indicates a process started previously terminated. The process id
+and component owning the process are indicated, as well as the exit code.
+This doesn't distinguish if the process was supposed to terminate or not.
+
 % BIND10_READING_BOSS_CONFIGURATION reading boss configuration
 The boss process is starting up, and will now process the initial
 configuration, as received from the configuration manager.

+ 2 - 0
src/bin/bind10/bind10_src.py.in

@@ -924,6 +924,8 @@ class BoB:
             if pid in self.processes:
                 # One of the processes we know about.  Get information on it.
                 component = self.processes.pop(pid)
+                logger.info(BIND10_PROCESS_ENDED, component.name(), pid,
+                            exit_status)
                 if component.running() and self.runnable:
                     # Tell it it failed. But only if it matters (we are
                     # not shutting down and the component considers itself

+ 1 - 0
src/lib/python/isc/bind10/special_component.py

@@ -37,6 +37,7 @@ class SockCreator(Component):
         self.__creator = isc.bind10.sockcreator.Creator(LIBEXECDIR + ':' +
                                                         os.environ['PATH'])
         self._boss.register_process(self.pid(), self)
+        self._boss.log_started(self.pid())
 
     def _stop_internal(self):
         self.__creator.terminate()