Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
25768c53
Commit
25768c53
authored
Jan 04, 2012
by
Michal 'vorner' Vaner
Browse files
[1454] Logging
parent
a842f40c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/ddns/ddns.py.in
View file @
25768c53
...
...
@@ -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()
...
...
src/bin/ddns/ddns_messages.mes
View file @
25768c53
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment