Browse Source

[2964] updated log and error messages in case of unknown datasrc.

JINMEI Tatuya 12 years ago
parent
commit
1ce2bb2f00
2 changed files with 13 additions and 13 deletions
  1. 2 2
      src/bin/xfrin/xfrin.py.in
  2. 11 11
      src/bin/xfrin/xfrin_messages.mes

+ 2 - 2
src/bin/xfrin/xfrin.py.in

@@ -1723,9 +1723,9 @@ class Xfrin:
         try:
         try:
             datasrc_client = clist.find(zone_name, True, False)[0]
             datasrc_client = clist.find(zone_name, True, False)[0]
             if datasrc_client is None: # can happen, so log it separately.
             if datasrc_client is None: # can happen, so log it separately.
-                logger.error(XFRIN_NO_DATASRC,
+                logger.error(XFRIN_DATASRC_UNKNOWN,
                              format_zone_str(zone_name, rrclass))
                              format_zone_str(zone_name, rrclass))
-                return (1, 'no data source for transferring %s' %
+                return (1, 'data source to transfer %s to is unknown' %
                         format_zone_str(zone_name, rrclass))
                         format_zone_str(zone_name, rrclass))
             zone_soa = _get_zone_soa(datasrc_client, zone_name, rrclass)
             zone_soa = _get_zone_soa(datasrc_client, zone_name, rrclass)
         except isc.datasrc.Error as ex: # rare case error, convert (so logged)
         except isc.datasrc.Error as ex: # rare case error, convert (so logged)

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

@@ -70,6 +70,17 @@ inconsistent state among different modules.  If other modules accept
 the update but xfrin produces this error, the xfrin module should
 the update but xfrin produces this error, the xfrin module should
 probably be restarted.
 probably be restarted.
 
 
+% XFRIN_DATASRC_UNKNOWN data source to transfer %1 to is unknown
+The xfrin daemon received a command that would trigger a transfer,
+but could not find a data source where the specified zone belongs.
+There can be several reasons for this error: it may be a simple
+misspelling in the xfrin or zonemgr configuration, or in the user
+supplied parameter if it is triggered by an external command (such as
+from bindctl).  Another possibility is that this is the initial transfer
+for a newly setup secondary zone.  In this case at least an initial empty zone
+must be created in one of configured data sources.  This can be done by
+the -e option of b10-loadzone.
+
 % XFRIN_EXITING exiting
 % XFRIN_EXITING exiting
 The xfrin daemon is exiting.
 The xfrin daemon is exiting.
 
 
@@ -163,17 +174,6 @@ from does not match the master address in the Xfrin configuration. The notify
 is ignored. This may indicate that the configuration for the master is wrong,
 is ignored. This may indicate that the configuration for the master is wrong,
 that a wrong machine is sending notifies, or that fake notifies are being sent.
 that a wrong machine is sending notifies, or that fake notifies are being sent.
 
 
-% XFRIN_NO_DATASRC no data source for transferring %1
-The xfrin daemon received a command that would trigger a transfer,
-but could not find a data source where the specified zone belong.
-There can be several reasons for this error: it may be a simple
-misspelling in the xfrin or zonemgr configuration, or in the user
-supplied parameter if it is triggered by an external command (such as
-from bindctl).  Another possibility is that this is the initial transfer
-for newly setup secondary zone.  In this case at least an initial empty zone
-must be created in one of configured data sources.  This can be done by
-the -e option of b10-loadzone.
-
 % XFRIN_RECEIVED_COMMAND received command: %1
 % XFRIN_RECEIVED_COMMAND received command: %1
 The xfrin daemon received a command on the command channel.
 The xfrin daemon received a command on the command channel.