Parcourir la source

[1901] Update manpages, log on certain update warnings

Second part of review as found in http://bind10.isc.org/ticket/1901#comment:11
Jelte Jansen il y a 12 ans
Parent
commit
8404133f0a

+ 2 - 1
src/bin/bind10/README

@@ -1,4 +1,5 @@
-This directory contains the source for the "Init of Bind" program.
+This directory contains the source for the "b10-init" program, as well as
+the "bind10" script that runs it.
 
 Files:
   Makefile.am      - build information

+ 2 - 2
src/bin/bind10/b10-init.xml

@@ -31,7 +31,7 @@
 
   <refnamediv>
     <refname>b10-init</refname>
-    <refpurpose>BIND 10 init process</refpurpose>
+    <refpurpose>BIND 10 Init process</refpurpose>
   </refnamediv>
 
   <docinfo>
@@ -368,7 +368,7 @@ xfrin
 
 <!-- TODO: formating -->
     <para>
-      The <varname>init</varname> configuration commands are:
+      The <varname>Init</varname> configuration commands are:
     </para>
 
 <!-- TODO -->

+ 1 - 1
src/bin/bind10/init.spec

@@ -1,7 +1,7 @@
 {
   "module_spec": {
     "module_name": "Init",
-    "module_description": "Master process",
+    "module_description": "Init process",
     "config_data": [
       {
         "item_name": "components",

+ 1 - 1
src/bin/bind10/init_messages.mes

@@ -1,4 +1,4 @@
-IN# Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above

+ 1 - 1
src/bin/bind10/tests/bind10_test.py.in

@@ -2226,7 +2226,7 @@ class SocketSrvTest(unittest.TestCase):
 
     def __accept(self):
         """
-        Hijact the accept method of the b10-init.
+        Hijack the accept method of the b10-init.
 
         Notes down it was called and stops b10-init.
         """

+ 1 - 1
src/bin/bindctl/bindctl_main.py.in

@@ -34,7 +34,7 @@ isc.util.process.rename()
 # number, and the overall BIND 10 version number (set in configure.ac).
 VERSION = "bindctl 20110217 (BIND 10 @PACKAGE_VERSION@)"
 
-DEFAULT_IDENTIFIER_DESC = "The identifier specifies the config item. Child elements are separated with the '/' character. List indices can be specified with '[i]', where i is an integer specifying the index, starting with 0. Examples: 'Init/start_auth', 'Recurse/listen_on[0]/address'. If no identifier is given, shows the item at the current location."
+DEFAULT_IDENTIFIER_DESC = "The identifier specifies the config item. Child elements are separated with the '/' character. List indices can be specified with '[i]', where i is an integer specifying the index, starting with 0. Examples: 'Init/start_auth', 'Auth/listen_on[0]/address'. If no identifier is given, shows the item at the current location."
 
 def prepare_config_commands(tool):
     '''Prepare fixed commands for local configuration editing'''

+ 1 - 1
src/bin/ddns/b10-ddns.xml

@@ -119,7 +119,7 @@
         <listitem>
           <para>
             This value is ignored at this moment, but is provided for
-            compatibility with the <command>bind10</command> Init process.
+            compatibility with the <command>b10-init</command> process.
           </para>
         </listitem>
       </varlistentry>

+ 2 - 2
src/bin/stats/b10-stats-httpd.xml

@@ -54,7 +54,7 @@
       intended for HTTP/XML interface for statistics module. This server
       process runs as a process separated from the process of the BIND 10 Stats
       daemon (<command>b10-stats</command>). The server is initially executed
-      by the b10-init process (<command>bind10</command>) and eventually
+      by the b10-init process and eventually
       exited by it.  The server is intended to serve requests by HTTP
       clients like web browsers and third-party modules. When the server is
       asked, it requests BIND 10 statistics data or its schema from
@@ -74,7 +74,7 @@
       10 statistics. The server uses CC session in communication
       with <command>b10-stats</command>. CC session is provided
       by <command>b10-msgq</command> which is started
-      by <command>bind10</command> in advance. The server is implemented by
+      by <command>b10-init</command> in advance. The server is implemented by
       HTTP-server libraries included in Python 3. The server obtains the
       configuration from the config manager (<command>b10-cfgmgr</command>) in
       runtime. Please see below for more details about this spec file and

+ 4 - 4
src/bin/stats/b10-stats.xml

@@ -56,18 +56,18 @@
       from each BIND 10 module. Its statistics information may be
       reported via <command>bindctl</command> or
       <command>b10-stats-httpd</command>.  It is started by
-      <command>bind10</command> and communicates by using the
+      <command>b10-init</command> and communicates by using the
       Command Channel by <command>b10-msgq</command> with other
-      modules like <command>bind10</command>, <command>b10-auth</command>
+      modules like <command>b10-init</command>, <command>b10-auth</command>
       and so on. <command>b10-stats</command> periodically requests statistics
       data from each module. The interval time can be configured
       via <command>bindctl</command>. <command>b10-stats</command> cannot
       accept any command from other modules for updating statistics data. The
       stats module collects data and
       aggregates it. <command>b10-stats</command> invokes an internal
-      command for <command>bind10</command> after its initial
+      command for <command>b10-init</command> after its initial
       starting to make sure it collects statistics data from
-      <command>bind10</command>.
+      <command>b10-init</command>.
     </para>
   </refsect1>
 

+ 8 - 3
src/lib/python/isc/config/cfgmgr.py

@@ -109,9 +109,14 @@ class ConfigManagerData:
         if new_data_version == 2:
             # 'Boss' got changed to 'Init'; If for some reason both are
             # present, simply ignore the old one
-            if 'Boss' in config and not 'Init' in config:
-                config['Init'] = config['Boss']
-                del config['Boss']
+            if 'Boss' in config:
+                if not 'Init' in config:
+                    config['Init'] = config['Boss']
+                    del config['Boss']
+                else:
+                    # This should not happen, but we don't want to overwrite
+                    # any config in this case, so warn about it
+                    logger.warn(CFGMGR_CONFIG_UPDATE_BOSS_AND_INIT_FOUND)
             new_data_version = 3
 
         config['version'] = new_data_version

+ 10 - 0
src/lib/python/isc/config/cfgmgr_messages.mes

@@ -41,6 +41,16 @@ system. The most likely cause is that msgq is not running.
 The configuration manager is starting, reading and saving the configuration
 settings to the shown file.
 
+% CFGMGR_CONFIG_UPDATE_BOSS_AND_INIT_FOUND Configuration found for both 'Boss' and 'Init'
+In the process of updating the configuration from version 2 to version 3,
+the configuration manager has found that there are existing configurations
+for both the old value 'Boss' and the new value 'Init'. This should in
+theory not happen, as in older versions 'Init' does not exist, and in newer
+versions 'Boss' does not exist. The configuration manager will continue
+with the update process, leaving the values for both as they are, so as not
+to overwrite any settings. However, the values for 'Boss' are ignored by
+BIND 10, and it is probably wise to check the configuration file manually.
+
 % CFGMGR_DATA_READ_ERROR error reading configuration database from disk: %1
 There was a problem reading the persistent configuration data as stored
 on disk. The file may be corrupted, or it is of a version from where