BIND 10 trac1190, updated. 15f662d68bbce471df63609cf8deccb280670048 [1190] Provide logging descriptions

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Dec 19 12:40:26 UTC 2012


The branch, trac1190 has been updated
       via  15f662d68bbce471df63609cf8deccb280670048 (commit)
      from  96c1a3cc7becc69e4bb24cd3e40aaa605e3d90e3 (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 15f662d68bbce471df63609cf8deccb280670048
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Wed Dec 19 13:39:30 2012 +0100

    [1190] Provide logging descriptions

-----------------------------------------------------------------------

Summary of changes:
 src/bin/msgq/msgq.py.in        |    6 ++---
 src/bin/msgq/msgq_messages.mes |   53 ++++++++++++++++++++++++++++------------
 2 files changed, 40 insertions(+), 19 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/msgq/msgq.py.in b/src/bin/msgq/msgq.py.in
index 49e9e4c..5f09f91 100755
--- a/src/bin/msgq/msgq.py.in
+++ b/src/bin/msgq/msgq.py.in
@@ -287,8 +287,8 @@ class MsgQ:
         try:
             routing, data = self.read_packet(fd, sock)
         except MsgQReceiveError as err:
-            self.kill_socket(fd, sock)
             logger.error(MSGQ_RECV_ERR, fd, err)
+            self.kill_socket(fd, sock)
             return
 
         try:
@@ -491,7 +491,7 @@ class MsgQ:
                 if err.args[0] == errno.EINTR:
                     events = []
                 else:
-                    logger.error(MSGQ_POLL_ERR, err)
+                    logger.fatal(MSGQ_POLL_ERR, err)
                     break
             for (fd, event) in events:
                 if fd == self.listen_socket.fileno():
@@ -502,7 +502,7 @@ class MsgQ:
                     elif event & select.POLLIN:
                         self.process_socket(fd)
                     else:
-                        logger.error(MSGQ_POLL_UNKNOWN_EVENT, event)
+                        logger.error(MSGQ_POLL_UNKNOWN_EVENT, fd, event)
 
     def run_kqueue(self):
         while self.running:
diff --git a/src/bin/msgq/msgq_messages.mes b/src/bin/msgq/msgq_messages.mes
index 8f9c341..d30e3eb 100644
--- a/src/bin/msgq/msgq_messages.mes
+++ b/src/bin/msgq/msgq_messages.mes
@@ -20,48 +20,69 @@
 # messages are in the correct order.
 
 % MSGQ_HDR_DECODE_ERR Error decoding header received from socket %1: %2
-Error
+The socket with mentioned file descriptor sent a packet. However, it was not
+possible to decode the routing header of the packet. The packet is ignored.
+This may be caused by a programmer error (one of the components sending invalid
+data) or possibly by incompatible version of msgq and the component (but that's
+unlikely, as the protocol is not changed often).
 
 % MSGQ_LISTENER_FAILED Failed to initialize listener on socket file '%1': %2
-Fatal
+The message queue daemon tried to listen on a file socket (the path is in the
+message), but it failed. The error from the operating system is logged.
 
 % MSGQ_LISTENER_SETUP Starting to listen on socket file '%1'
-Debug
+Debug message. The listener is trying to open a listening socket.
 
 % MSGQ_LISTENER_STARTED Successfully started to listen
-Debug
+Debug message. The message queue successfully opened a listening socket and
+waits for incoming connections.
 
 % MSGQ_POLL_ERR Error while polling for events: %1
-Error
+A low-level error happened when waiting for events, the error is logged. The
+reason for this varies, but it usually means the system is short on some
+resources.
 
-% MSGQ_POLL_UNKNOWN_EVENT Got an unknown event from the poller: %1
-Error
+% MSGQ_POLL_UNKNOWN_EVENT Got an unknown event from the poller for fd %1: %2
+An unknown event got out from the poll() system call. This should generally not
+happen and it is either a programmer error or OS bug. The event is ignored. The
+number noted as the event is the raw encoded value, which might be useful to
+the authors when figuring the problem out.
 
 % MSGQ_READ_UNKNOWN_FD Got read on strange socket %1
-Error, ignoring
+The OS reported a file descriptor is ready to read. But the daemon doesn't know
+the mentioned file descriptor, which is either a programmer error or OS bug.
+The read event is ignored.
 
 % MSGQ_RECV_ERR Error reading from socket %1: %2
-Error
+There was a low-level error when reading from a socket. The error is logged and
+the corresponding socket is dropped.
 
 % MSGQ_RECV_HDR Received header: %1
-Debug
+Debug message. This message includes the whole routing header of a packet.
 
 % MSGQ_RECV_INVALID_CMD Received invalid command: %1
-Error
+An unknown command listed in the log has been received. It is ignored. This
+indicates either a programmer error (eg. a typo in the command name) or
+incompatible version of a module and message queue daemon.
 
 % MSGQ_SEND_ERR Error while sending to socket %1: %2
-Error
+There was a low-level error when sending data to a socket. The error is logged
+and the corresponding socket is dropped.
 
 % MSGQ_SOCK_CLOSE Closing socket fd %1
-Debug
+Debug message. Closing the mentioned socket.
 
 % MSGQ_START Msgq version %1 starting
-Debug
+Debug message. The message queue is starting up.
 
 % MSGQ_START_FAIL Error during startup: %1
+There was an error during early startup of the daemon. More concrete error is
+in the log. The daemon terminates as a result.
 
 % MSGQ_SUBS_APPEND_TARGET Appending to existing target for subscription to group '%1' for instance '%2'
-Debug
+Debug message. Creating a new subscription by appending it to already existing
+data structure.
 
 % MSGQ_SUBS_NEW_TARGET Creating new target for subscription to group '%1' for instance '%2'
-Debug
+Debug message. Creating a new subscription. Also creating a new data structure
+to hold it.



More information about the bind10-changes mailing list