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:
"""
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)
"""
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()
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
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.