Michal 'vorner' Vaner il y a 11 ans
Parent
commit
6674553cc7
2 fichiers modifiés avec 23 ajouts et 18 suppressions
  1. 18 13
      src/bin/xfrin/xfrin.py.in
  2. 5 5
      src/bin/xfrin/xfrin_messages.mes

+ 18 - 13
src/bin/xfrin/xfrin.py.in

@@ -652,7 +652,8 @@ class XfrinConnection(asyncore.dispatcher):
             self.connect(self._master_addrinfo[2])
             self.connect(self._master_addrinfo[2])
             return True
             return True
         except socket.error as e:
         except socket.error as e:
-            logger.error(XFRIN_CONNECT_MASTER, self._master_addrinfo[2],
+            logger.error(XFRIN_CONNECT_MASTER, self.tsig_key_name,
+                         self._master_addrinfo[2],
                          str(e))
                          str(e))
             return False
             return False
 
 
@@ -767,14 +768,15 @@ class XfrinConnection(asyncore.dispatcher):
         '''
         '''
         Used as error callback below.
         Used as error callback below.
         '''
         '''
-        logger.error(XFRIN_ZONE_INVALID, self._zone_name, self._rrclass,
-                     reason)
+        logger.error(XFRIN_ZONE_INVALID, self._zone_name,
+                     self._rrclass, reason)
 
 
     def __validate_warning(self, reason):
     def __validate_warning(self, reason):
         '''
         '''
         Used as warning callback below.
         Used as warning callback below.
         '''
         '''
-        logger.warn(XFRIN_ZONE_WARN, self._zone_name, self._rrclass, reason)
+        logger.warn(XFRIN_ZONE_WARN, self._zone_name,
+                    self._rrclass, reason)
 
 
     def finish_transfer(self):
     def finish_transfer(self):
         """
         """
@@ -965,17 +967,18 @@ class XfrinConnection(asyncore.dispatcher):
             # The log message doesn't contain the exception text, since there's
             # The log message doesn't contain the exception text, since there's
             # only one place where the exception is thrown now and it'd be the
             # only one place where the exception is thrown now and it'd be the
             # same generic message every time.
             # same generic message every time.
-            logger.error(XFRIN_INVALID_ZONE_DATA, self.zone_str(),
+            logger.error(XFRIN_INVALID_ZONE_DATA,
+                         self.zone_str(),
                          format_addrinfo(self._master_addrinfo))
                          format_addrinfo(self._master_addrinfo))
             ret = XFRIN_FAIL
             ret = XFRIN_FAIL
         except XfrinProtocolError as e:
         except XfrinProtocolError as e:
-            logger.info(XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION, req_str,
-                        self.zone_str(),
+            logger.info(XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION,
+                        req_str, self.zone_str(),
                         format_addrinfo(self._master_addrinfo), str(e))
                         format_addrinfo(self._master_addrinfo), str(e))
             ret = XFRIN_FAIL
             ret = XFRIN_FAIL
         except XfrinException as e:
         except XfrinException as e:
-            logger.error(XFRIN_XFR_TRANSFER_FAILURE, req_str,
-                         self.zone_str(),
+            logger.error(XFRIN_XFR_TRANSFER_FAILURE,
+                         req_str, self.zone_str(),
                          format_addrinfo(self._master_addrinfo), str(e))
                          format_addrinfo(self._master_addrinfo), str(e))
             ret = XFRIN_FAIL
             ret = XFRIN_FAIL
         except Exception as e:
         except Exception as e:
@@ -1142,12 +1145,12 @@ def __process_xfrin(server, zone_name, rrclass, datasrc_client, zone_soa,
                     # fallback.
                     # fallback.
                     if request_ixfr == ZoneInfo.REQUEST_IXFR_ONLY:
                     if request_ixfr == ZoneInfo.REQUEST_IXFR_ONLY:
                         logger.warn(XFRIN_XFR_TRANSFER_FALLBACK_DISABLED,
                         logger.warn(XFRIN_XFR_TRANSFER_FALLBACK_DISABLED,
-                                    conn.zone_str())
+                                    tsig_key, conn.zone_str())
                     else:
                     else:
                         retry = True
                         retry = True
                         request_type = RRType.AXFR
                         request_type = RRType.AXFR
                         logger.warn(XFRIN_XFR_TRANSFER_FALLBACK,
                         logger.warn(XFRIN_XFR_TRANSFER_FALLBACK,
-                                    conn.zone_str())
+                                    tsig_key, conn.zone_str())
                         conn.close()
                         conn.close()
                         conn = None
                         conn = None
 
 
@@ -1688,7 +1691,8 @@ class Xfrin:
                 except isc.cc.session.SessionTimeout:
                 except isc.cc.session.SessionTimeout:
                     pass        # for now we just ignore the failure
                     pass        # for now we just ignore the failure
             except socket.error as err:
             except socket.error as err:
-                logger.error(XFRIN_MSGQ_SEND_ERROR, XFROUT_MODULE_NAME, ZONE_MANAGER_MODULE_NAME)
+                logger.error(XFRIN_MSGQ_SEND_ERROR, self.tsig_key_name,
+                             XFROUT_MODULE_NAME, ZONE_MANAGER_MODULE_NAME)
 
 
         else:
         else:
             msg = create_command(notify_out.ZONE_XFRIN_FAILED, param)
             msg = create_command(notify_out.ZONE_XFRIN_FAILED, param)
@@ -1702,7 +1706,8 @@ class Xfrin:
                 except isc.cc.session.SessionTimeout:
                 except isc.cc.session.SessionTimeout:
                     pass        # for now we just ignore the failure
                     pass        # for now we just ignore the failure
             except socket.error as err:
             except socket.error as err:
-                logger.error(XFRIN_MSGQ_SEND_ERROR_ZONE_MANAGER, ZONE_MANAGER_MODULE_NAME)
+                logger.error(XFRIN_MSGQ_SEND_ERROR_ZONE_MANAGER, self.tsig_key_name,
+                             ZONE_MANAGER_MODULE_NAME)
 
 
     def startup(self):
     def startup(self):
         logger.debug(DBG_PROCESS, XFRIN_STARTED)
         logger.debug(DBG_PROCESS, XFRIN_STARTED)

+ 5 - 5
src/bin/xfrin/xfrin_messages.mes

@@ -56,7 +56,7 @@ most likely cause is that xfrin the msgq daemon is not running.
 There was an error while the given command was being processed. The
 There was an error while the given command was being processed. The
 error is given in the log message.
 error is given in the log message.
 
 
-% XFRIN_CONNECT_MASTER error connecting to master at %1: %2
+% XFRIN_CONNECT_MASTER (with TSIG %1) error connecting to master at %2: %3
 There was an error opening a connection to the master. The error is
 There was an error opening a connection to the master. The error is
 shown in the log message.
 shown in the log message.
 
 
@@ -159,12 +159,12 @@ the primary server between the SOA and IXFR queries.  The client
 implementation confirms the whole response is this single SOA, and
 implementation confirms the whole response is this single SOA, and
 aborts the transfer just like a successful case.
 aborts the transfer just like a successful case.
 
 
-% XFRIN_MSGQ_SEND_ERROR error while contacting %1 and %2
+% XFRIN_MSGQ_SEND_ERROR (with TSIG %1) error while contacting %2 and %3
 There was a problem sending a message to the xfrout module or the
 There was a problem sending a message to the xfrout module or the
 zone manager. This most likely means that the msgq daemon has quit or
 zone manager. This most likely means that the msgq daemon has quit or
 was killed.
 was killed.
 
 
-% XFRIN_MSGQ_SEND_ERROR_ZONE_MANAGER error while contacting %1
+% XFRIN_MSGQ_SEND_ERROR_ZONE_MANAGER (with TSIG %1) error while contacting %2
 There was a problem sending a message to the zone manager. This most
 There was a problem sending a message to the zone manager. This most
 likely means that the msgq daemon has quit or was killed.
 likely means that the msgq daemon has quit or was killed.
 
 
@@ -245,13 +245,13 @@ often.
 The XFR transfer for the given zone has failed due to an internal error.
 The XFR transfer for the given zone has failed due to an internal error.
 The error is shown in the log message.
 The error is shown in the log message.
 
 
-% XFRIN_XFR_TRANSFER_FALLBACK falling back from IXFR to AXFR for %1
+% XFRIN_XFR_TRANSFER_FALLBACK (with TSIG %1) falling back from IXFR to AXFR for %2
 The IXFR transfer of the given zone failed. This might happen in many cases,
 The IXFR transfer of the given zone failed. This might happen in many cases,
 such that the remote server doesn't support IXFR, we don't have the SOA record
 such that the remote server doesn't support IXFR, we don't have the SOA record
 (or the zone at all), we are out of sync, etc. In many of these situations,
 (or the zone at all), we are out of sync, etc. In many of these situations,
 AXFR could still work. Therefore we try that one in case it helps.
 AXFR could still work. Therefore we try that one in case it helps.
 
 
-% XFRIN_XFR_TRANSFER_FALLBACK_DISABLED suppressing fallback from IXFR to AXFR for %1
+% XFRIN_XFR_TRANSFER_FALLBACK_DISABLED (with TSIG %1) suppressing fallback from IXFR to AXFR for %2
 An IXFR transfer of the given zone failed.  By default AXFR will be
 An IXFR transfer of the given zone failed.  By default AXFR will be
 tried next, but this fallback is disabled by configuration, so the
 tried next, but this fallback is disabled by configuration, so the
 whole transfer attempt failed at that point.  If the reason for the
 whole transfer attempt failed at that point.  If the reason for the