BIND 10 trac213-incremental-restarts, updated. 1d9614bc52634bd512121f34af66290a2cdb2958 [213] Some more logging
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Nov 3 10:09:00 UTC 2011
The branch, trac213-incremental-restarts has been updated
via 1d9614bc52634bd512121f34af66290a2cdb2958 (commit)
via 34092bce6cb5755eb6b53979f8f624ca78b592fb (commit)
via 35ca4f5aa94daa5e3a8ddcb02812e7d76685e65e (commit)
via 6d46a3787127f87aa65c9dfb626476f79b4f0194 (commit)
via c692292fb26bf6af6e94b7e160c0c7af27e123ac (commit)
via d6a9dffdd4ee8af94e31ae9462e2ef851b49fca8 (commit)
from 0428f6fcc7b5acc73f70913a17bd6f23c5a6ad3a (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 1d9614bc52634bd512121f34af66290a2cdb2958
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Nov 3 11:07:24 2011 +0100
[213] Some more logging
commit 34092bce6cb5755eb6b53979f8f624ca78b592fb
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Nov 3 10:56:34 2011 +0100
[213] Eliminate unused log messages
commit 35ca4f5aa94daa5e3a8ddcb02812e7d76685e65e
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Nov 3 10:52:55 2011 +0100
[213] Remove unused variable
commit 6d46a3787127f87aa65c9dfb626476f79b4f0194
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Nov 3 10:51:34 2011 +0100
[213] Note about relict method
commit c692292fb26bf6af6e94b7e160c0c7af27e123ac
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Nov 3 10:15:41 2011 +0100
[213] Note about naming
commit d6a9dffdd4ee8af94e31ae9462e2ef851b49fca8
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Nov 3 10:13:43 2011 +0100
[213] Naming
-----------------------------------------------------------------------
Summary of changes:
src/bin/bind10/bind10_messages.mes | 25 +++--------------------
src/bin/bind10/bind10_src.py.in | 23 ++++++++++++++++++---
src/lib/python/isc/bind10/special_component.py | 1 +
3 files changed, 24 insertions(+), 25 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/bind10/bind10_messages.mes b/src/bin/bind10/bind10_messages.mes
index fd83d8d..9191845 100644
--- a/src/bin/bind10/bind10_messages.mes
+++ b/src/bin/bind10/bind10_messages.mes
@@ -113,27 +113,15 @@ old process was not shut down correctly, and needs to be killed, or
another instance of BIND10, with the same msgq domain socket, is
running, which needs to be stopped.
-% BIND10_MSGQ_DAEMON_ENDED b10-msgq process died, shutting down
-The message bus daemon has died. This is a fatal error, since it may
-leave the system in an inconsistent state. BIND10 will now shut down.
-
% BIND10_MSGQ_DISAPPEARED msgq channel disappeared
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_NO_EXIT_STATUS process %1 (PID %2) died: exit status not available
-The given process ended unexpectedly, but no exit status is
-available. See BIND10_PROCESS_ENDED_WITH_EXIT_STATUS for a longer
-description.
-
-% BIND10_PROCESS_ENDED_WITH_EXIT_STATUS process %1 (PID %2) terminated, exit status = %3
-The given process ended unexpectedly with the given exit status.
-Depending on which module it was, it may simply be restarted, or it
-may be a problem that will cause the boss module to shut down too.
-The latter happens if it was the message bus daemon, which, if it has
-died suddenly, may leave the system in an inconsistent state. BIND10
-will also shut down now if it has been run with --brittle.
+% 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
@@ -187,11 +175,6 @@ which failed is unknown (not one of 'S' for socket or 'B' for bind).
The boss requested a socket from the creator, but the answer is unknown. This
looks like a programmer error.
-% BIND10_SOCKCREATOR_CRASHED the socket creator crashed
-The socket creator terminated unexpectedly. It is not possible to restart it
-(because the boss already gave up root privileges), so the system is going
-to terminate.
-
% BIND10_SOCKCREATOR_EOF eof while expecting data from socket creator
There should be more data from the socket creator, but it closed the socket.
It probably crashed.
diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in
index 71fd0be..6c9c79a 100755
--- a/src/bin/bind10/bind10_src.py.in
+++ b/src/bin/bind10/bind10_src.py.in
@@ -254,6 +254,11 @@ class BoB:
self.msgq_socket_file = msgq_socket_file
self.nocache = nocache
self.component_config = {}
+ # This is not named "components" on purpose, as there doesn't have
+ # to be one-to-one correspondence between processes and components
+ # (A component can have multiple processes, therefore taking multiple
+ # places in the dict, or no processes at all). This tracks the real,
+ # running processes.
self.processes = {}
self.runnable = False
self.uid = setuid
@@ -264,7 +269,6 @@ class BoB:
self.cmdctl_port = cmdctl_port
self.brittle = brittle
self.wait_time = wait_time
- self.sockcreator = None
self._component_configurator = isc.bind10.component.Configurator(self,
isc.bind10.special_component.get_specials())
# The priorities here make them start in the correct order. First
@@ -611,12 +615,12 @@ class BoB:
self.log_started(newproc.pid)
return newproc
- def register_process(self, pid, info):
+ def register_process(self, pid, component):
"""
Put another process into boss to watch over it. When the process
- dies, the info.failed() is called with the exit code.
+ dies, the component.failed() is called with the exit code.
"""
- self.processes[pid] = info
+ self.processes[pid] = component
def start_simple(self, name):
"""
@@ -920,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
@@ -938,7 +944,16 @@ class BoB:
The values returned can be safely passed into select() as the
timeout value.
+
"""
+ # TODO: This is an artefact of previous way of handling processes. The
+ # restart queue is currently empty at all times, so this returns None
+ # every time it is called (thought is a relict that is obviously wrong,
+ # it is called and it doesn't hurt).
+ #
+ # It is preserved for archeological reasons for the time when we return
+ # the delayed restarts, most of it might be useful then (or, if it is
+ # found useless, removed).
next_restart = None
# if we're shutting down, then don't restart
if not self.runnable:
diff --git a/src/lib/python/isc/bind10/special_component.py b/src/lib/python/isc/bind10/special_component.py
index ecdc282..d88e8e4 100644
--- a/src/lib/python/isc/bind10/special_component.py
+++ b/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()
More information about the bind10-changes
mailing list