BIND 10 #2896: change some bind10 process logging from info to debug
BIND 10 Development
do-not-reply at isc.org
Tue Apr 2 02:05:53 UTC 2013
#2896: change some bind10 process logging from info to debug
-------------------------------------+-------------------------------------
Reporter: jreed | Owner:
Type: | Status: new
defect | Milestone: New Tasks
Priority: low | Keywords:
Component: Boss | Sensitive: 0
of BIND | Sub-Project: Core
CVSS Scoring: | Estimated Difficulty: 0
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
By default, logging for shutting down or stopping processes is too
verbose. For example:
{{{
2013-03-27 22:13:53.397 INFO [b10-init.init/11860] BIND10_COMPONENT_STOP
component b10-cmdctl is being stopped
2013-03-27 22:13:53.405 INFO [b10-cmdctl.cmdctl/11867] CMDCTL_EXITING
exiting
2013-03-27 22:13:54.409 INFO [b10-init.init/11860] BIND10_PROCESS_ENDED
process 11867 of b10-cmdctl ended with status 0
}}}
jinmei and I discussed this and we think that BIND10_COMPONENT_STOP and
BIND10_PROCESS_ENDED can be debug.
Here is a patch:
{{{
diff --git a/src/bin/bind10/init.py.in b/src/bin/bind10/init.py.in
index e57971a..4ad33c5 100755
--- a/src/bin/bind10/init.py.in
+++ b/src/bin/bind10/init.py.in
@@ -821,8 +821,8 @@ class Init:
if pid in self.components:
# One of the components we know about. Get information
on it.
component = self.components.pop(pid)
- logger.info(BIND10_PROCESS_ENDED, component.name(), pid,
- exit_status)
+ logger.debug(DBG_COMMANDS, BIND10_PROCESS_ENDED,
+ component.name(), pid, exit_status)
if component.is_running() and self.runnable:
# Tell it it failed. But only if it matters (we are
# not shutting down and the component considers
itself
diff --git a/src/bin/bind10/init_messages.mes
b/src/bin/bind10/init_messages.mes
index 267790d..6c30085 100644
--- a/src/bin/bind10/init_messages.mes
+++ b/src/bin/bind10/init_messages.mes
@@ -38,7 +38,8 @@ named component. The component is not considered started
and further actions
will be taken about it.
% BIND10_COMPONENT_STOP component %1 is being stopped
-A component is about to be asked to stop willingly by the b10-init.
+A debug message. A component is about to be asked to stop willingly
+by the b10-init.
% BIND10_COMPONENT_UNSATISFIED component %1 is required to run and failed
A component failed for some reason (see previous messages). It is either
a core
@@ -132,9 +133,10 @@ descriptor. The error is mentioned, most common
reason is that the request
is invalid and may not come from bind10 process at all.
% 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.
+This debug message 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_INIT_CONFIGURATION reading b10-init configuration
The b10-init process is starting up, and will now process the initial
diff --git a/src/lib/python/isc/bind10/component.py
b/src/lib/python/isc/bind10/component.py
index 2efb376..d758daf 100644
--- a/src/lib/python/isc/bind10/component.py
+++ b/src/lib/python/isc/bind10/component.py
@@ -198,7 +198,7 @@ class BaseComponent:
# of scope of unittests.
if not self.is_running():
raise ValueError("Can't stop a component which is not
running")
- logger.info(BIND10_COMPONENT_STOP, self.name())
+ logger.debug(DBG_TRACE_DATA, BIND10_COMPONENT_STOP, self.name())
self.__state = STATE_STOPPED
self._stop_internal()
}}}
Maybe an additional logging for warning could be added if the exit value
is not 0.
Also I didn't think much about the debug level.
Is this okay?
A Changelog entry could be: [func]*
b10-init logging identifiers BIND10_COMPONENT_STOP and
BIND10_PROCESS_ENDED changed from INFO category to DEBUG so shutdown
logging by default will be less noisy.
--
Ticket URL: <http://bind10.isc.org/ticket/2896>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list