Browse Source

[trac1154] Updated messages after review

Stephen Morris 13 years ago
parent
commit
98953e35ee
2 changed files with 43 additions and 32 deletions
  1. 10 9
      src/bin/zonemgr/zonemgr.py.in
  2. 33 23
      src/bin/zonemgr/zonemgr_messages.mes

+ 10 - 9
src/bin/zonemgr/zonemgr.py.in

@@ -96,7 +96,6 @@ class ZonemgrRefresh:
     do zone refresh.
     Zone timers can be started by calling run_timer(), and it
     can be stopped by calling shutdown() in another thread.
-
     """
 
     def __init__(self, cc, db_file, slave_socket, config_data):
@@ -374,13 +373,14 @@ class ZonemgrRefresh:
 
     def run_timer(self, daemon=False):
         """
-        Keep track of zone timers. Spawns and starts a thread. The thread object is returned.
+        Keep track of zone timers. Spawns and starts a thread. The thread object
+        is returned.
 
         You can stop it by calling shutdown().
         """
         # Small sanity check
         if self._running:
-            logger.error(ZONEMGR_TIMER_ALREADY_RUNNING)
+            logger.error(ZONEMGR_TIMER_THREAD_RUNNING)
             raise RuntimeError("Trying to run the timers twice at the same time")
 
         # Prepare the launch
@@ -405,7 +405,7 @@ class ZonemgrRefresh:
         called from a different thread.
         """
         if not self._running:
-            logger.error(ZONEMGR_TIMER_NOT_RUNNING)
+            logger.error(ZONEMGR_NO_TIMER_THREAD)
             raise RuntimeError("Trying to shutdown, but not running")
 
         # Ask the thread to stop
@@ -526,8 +526,8 @@ class Zonemgr:
         return db_file
 
     def shutdown(self):
-        """Shutdown the zonemgr process. the thread which is keeping track of zone
-        timers should be terminated.
+        """Shutdown the zonemgr process. The thread which is keeping track of
+           zone timers should be terminated.
         """
         self._zone_refresh.shutdown()
 
@@ -593,9 +593,10 @@ class Zonemgr:
 
     def command_handler(self, command, args):
         """Handle command receivd from command channel.
-        ZONE_NOTIFY_COMMAND is issued by Auth process; ZONE_XFRIN_SUCCESS_COMMAND
-        and ZONE_XFRIN_FAILED_COMMAND are issued by Xfrin process; shutdown is issued
-        by a user or Boss process. """
+        ZONE_NOTIFY_COMMAND is issued by Auth process;
+        ZONE_XFRIN_SUCCESS_COMMAND and ZONE_XFRIN_FAILED_COMMAND are issued by
+        Xfrin process;
+        shutdown is issued by a user or Boss process. """
         answer = create_answer(0)
         if command == ZONE_NOTIFY_COMMAND:
             """ Handle Auth notify command"""

+ 33 - 23
src/bin/zonemgr/zonemgr_messages.mes

@@ -29,11 +29,11 @@ terminal and it was terminated via a keyboard interrupt signal.
 
 % ZONEMGR_LOAD_ZONE loading zone %1 (class %2)
 This is a debug message indicating that the zone of the specified class
-is being loaded into the zone manager.
+is being loaded.
 
 % ZONEMGR_NO_MASTER_ADDRESS internal BIND 10 command did not contain address of master
-A command received by the zone manager from another BIND 10 module did
-not contain the address of the master server from which a NOTIFY message
+A command received by the zone manager from the Auth module did not
+contain the address of the master server from which a NOTIFY message
 was received.  This may be due to an internal programming error; please
 submit a bug report.
 
@@ -42,6 +42,11 @@ When loading the named zone of the specified class the zone manager
 discovered that the data did not contain an SOA record.  The load has
 been abandoned.
 
+% ZONEMGR_NO_TIMER_THREAD trying to stop zone timer thread but it is not running
+At attempt was made to stop the timer thread (used to track when zones
+should be refreshed) but it was not running.  This may indicate an
+internal program error.  Please submit a bug report.
+
 % ZONEMGR_NO_ZONE_CLASS internal BIND 10 command did not contain class of zone
 A command received by the zone manager from another BIND 10 module did
 not contain the class of the zone on which the zone manager should act.
@@ -56,25 +61,34 @@ bug report.
 
 % ZONEMGR_RECEIVE_NOTIFY received NOTIFY command for zone %1 (class %2)
 This is a debug message indicating that the zone manager has received a
-NOTIFY command over the command channel.
+NOTIFY command over the command channel.  The command is sent by the Auth
+process when it is acting as a slave server for the zone and causes the
+zone manager to record the master server for the zone and start a timer;
+when the time rexpires, the master will be polled to see if it contains
+new data.
 
 % ZONEMGR_RECEIVE_SHUTDOWN received SHUTDOWN command
-This is a debug message indicating that the zone manager has received a
-SHUTDOWN command over the command channel.
+This is a debug message indicating that the zone manager has received
+a SHUTDOWN command over the command channel from the Boss process.
+It will act on this command and shut down.
 
 % ZONEMGR_RECEIVE_UNKNOWN received unknown command '%1'
 This is a warning message indicating that the zone manager has received
-the stated command over the command channel.  This is not known to the
-zone zone manager and although the command is ignored, its receipt may
-indicate an internal error.  Please submit a bug report.
+the stated command over the command channel.  The command is not known
+to the zone manager and although the command is ignored, its receipt
+may indicate an internal error.  Please submit a bug report.
 
 % ZONEMGR_RECEIVE_XFRIN_FAILED received XFRIN FAILED command for zone %1 (class %2)
-This is a debug message indicating that the zone manager has received an
-XFRIN FAILED command over the command channel.
+This is a debug message indicating that the zone manager has received
+an XFRIN FAILED command over the command channel.  The command is sent
+by the Xfrin process when a transfer of zone data into the system has
+failed, and causes the zone manager to schedule another transfer attempt.
 
 % ZONEMGR_RECEIVE_XFRIN_SUCCESS received XFRIN SUCCESS command for zone %1 (class %2)
-This is a debug message indicating that the zone manager has received an
-XFRIN SUCCESS command over the command channel.
+This is a debug message indicating that the zone manager has received
+an XFRIN SUCCESS command over the command channel.  The command is sent
+by the Xfrin process when the transfer of zone data into the system has
+succeeded, and causes the data to be loaded and served by BIND 10.
 
 % ZONEMGR_REFRESH_ZONE refreshing zone %1 (class %2)
 The zone manager is refreshing the named zone of the specified class
@@ -105,16 +119,12 @@ A debug message, output when the zone manager has shut down completely.
 % ZONEMGR_STARTING zone manager starting
 A debug message output when the zone manager starts up.
 
-% ZONEMGR_TIMER_ALREADY_RUNNING trying to start a timer but one is already running
-This message is issued when an attempt is made to start a timer thread
-but the thread is already running.  It indicates either an error in the
-program logic or a problem with stopping a previous instance of the timer.
-Please submit a bug report.
-
-% ZONEMGR_TIMER_NOT_RUNNING trying to shutdown but zone manager is not running
-At attempt was made to stop the zone manager's internal timer thread
-but it was not running.  This may indicate an internal program error.
-Please submit a bug report.
+% ZONEMGR_TIMER_THREAD_RUNNING trying to start timer thread but one is already running
+This message is issued when an attempt is made to start the timer
+thread (which keeps track of when zones need a refresh) but one is
+already running.  It indicates either an error in the program logic or
+a problem with stopping a previous instance of the timer.  Please submit
+a bug report.
 
 % ZONEMGR_UNKNOWN_ZONE_FAIL zone %1 (class %2) is not known to the zone manager
 An XFRIN operation has failed but the zone that was the subject of the