BIND 10 trac1454, updated. 25768c5398397bb271e0da9d8be89f545feb620e [1454] Logging
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Jan 4 09:31:52 UTC 2012
The branch, trac1454 has been updated
via 25768c5398397bb271e0da9d8be89f545feb620e (commit)
from a842f40cddc919f5bb0aa68943fd7ef7b8938a04 (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 25768c5398397bb271e0da9d8be89f545feb620e
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Wed Jan 4 10:31:29 2012 +0100
[1454] Logging
-----------------------------------------------------------------------
Summary of changes:
src/bin/ddns/ddns.py.in | 6 +++++-
src/bin/ddns/ddns_messages.mes | 16 ++++++++++++++++
2 files changed, 21 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/ddns/ddns.py.in b/src/bin/ddns/ddns.py.in
index 47f4435..eb44011 100755
--- a/src/bin/ddns/ddns.py.in
+++ b/src/bin/ddns/ddns.py.in
@@ -34,6 +34,7 @@ import signal
isc.log.init("b10-ddns")
logger = isc.log.Logger("ddns")
+DBG_ACTIVITY = logger.DBGLVL_TRACE_BASIC
DATA_PATH = bind10_config.DATA_PATH
if "B10_FROM_SOURCE" in os.environ:
@@ -135,6 +136,7 @@ class DDNSServer:
"""
socket = self._listen_socket.accept()
fileno = socket.fileno()
+ logger.debug(DBG_ACTIVITY, DDNS_NEW_CONN, fileno)
session = isc.util.io.socketsession.SocketSessionReceiver(socket)
self._socket_sessions[fileno] = (socket, session)
@@ -155,13 +157,15 @@ class DDNSServer:
"""
Handle incoming event on the socket with given fileno.
"""
+ logger.debug(DBG_ACTIVITY, DDNS_INCOMING, fileno)
(socket, session) = self._socket_sessions[fileno]
try:
request = session.pop()
self.handle_request(request)
- except isc.util.io.socketsession.SocketSessionError:
+ except isc.util.io.socketsession.SocketSessionError as se:
# No matter why this failed, the connection is in unknown, possibly
# broken state. So, we close the socket and remove the session.
+ logger.warn(DDNS_DROP_CONN, fileno, se)
del self._socket_sessions[fileno]
socket.close()
diff --git a/src/bin/ddns/ddns_messages.mes b/src/bin/ddns/ddns_messages.mes
index 36c6ed1..c68b72f 100644
--- a/src/bin/ddns/ddns_messages.mes
+++ b/src/bin/ddns/ddns_messages.mes
@@ -32,6 +32,18 @@ configuration manager b10-cfgmgr is not running.
The ddns process encountered an error when installing the configuration at
startup time. Details of the error are included in the log message.
+% DDNS_DROP_CONN dropping connection on file descriptor %1 because of error %2
+There was an error on a connection with the b10-auth server (or whatever
+connects to the ddns daemon). This might be OK, for example when the
+authoritative server shuts down, the connection would get closed. It also
+can mean the system is busy and can't keep up or that the other side got
+confused and sent bad data.
+
+% DDNS_INCOMING incoming activity on file descriptor %1
+A debug message, informing there's some activity on the given file descriptor.
+It will be either a request or the file descriptor will be closed. See
+following log messages to see what of it.
+
% DDNS_MODULECC_SESSION_ERROR error encountered by configuration/command module: %1
There was a problem in the lower level module handling configuration and
control commands. This could happen for various reasons, but the most likely
@@ -39,6 +51,10 @@ cause is that the configuration database contains a syntax error and ddns
failed to start at initialization. A detailed error message from the module
will also be displayed.
+% DDNS_NEW_CONN new connection on file descriptor %1
+Debug message. We received a connection and we are going to start handling
+requests from it.
+
% DDNS_RECEIVED_SHUTDOWN_COMMAND shutdown command received
The ddns process received a shutdown command from the command channel
and will now shut down.
More information about the bind10-changes
mailing list