BIND 10 trac2210, updated. 80b0cf61a83ef37110d4b86c15704a923f0b9d6e [2210] update catch/error logs in datasrc reconfigure

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Oct 23 12:37:52 UTC 2012


The branch, trac2210 has been updated
       via  80b0cf61a83ef37110d4b86c15704a923f0b9d6e (commit)
      from  20fdec048d51fa193425ebb284278ffeec37b93f (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 80b0cf61a83ef37110d4b86c15704a923f0b9d6e
Author: Jelte Jansen <jelte at isc.org>
Date:   Tue Oct 23 14:37:31 2012 +0200

    [2210] update catch/error logs in datasrc reconfigure

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

Summary of changes:
 src/bin/auth/auth_messages.mes     |   40 +++++++++++++++---------------------
 src/bin/auth/datasrc_clients_mgr.h |   16 +++++++--------
 2 files changed, 25 insertions(+), 31 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth_messages.mes b/src/bin/auth/auth_messages.mes
index 39d0283..c51d4eb 100644
--- a/src/bin/auth/auth_messages.mes
+++ b/src/bin/auth/auth_messages.mes
@@ -77,30 +77,31 @@ to be restarted by hand.
 
 % AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_CONFIG_ERROR Error in data source configuration: %1
 The thread for maintaining data source clients has received a command to
-reconfigure, but the parameter data contains an error. This data should have
-been validated, but may still contain an error. The system is still running
-with the data sources that were previously configured (i.e. as if the
+reconfigure, but the parameter data (the new configuration) contains an
+error. The most likely cause is that the datasource-specific configuration
+data is not what the data source expects. The system is still running with
+the data sources that were previously configured (i.e. as if the
 configuration has not changed), and the configuration data needs to be
 checked.
 The specific problem is printed in the log message.
 
-% AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_ERROR Error in data source configuration: %1
+% AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_DATASRC_ERROR Error setting up data source: %1
 The thread for maintaining data source clients has received a command to
-reconfigure, but raised an exception while reconfiguring. This is most
-likely a bug in the data source, but it is probably a good idea to verify
-the configuration itself. The system is still running with the data sources
-that were previously configured (i.e. as if the configuration has not
-changed), and the configuration data needs to be checked.
+reconfigure, but a data source failed to set up. This may be a problem with
+the data that is configured (e.g. unreadable files, inconsistent data,
+parser problems, database connection problems, etc.), but it could be a bug
+in the data source implementation as well. The system is still running with
+the data sources that were previously configured (i.e. as if the
+configuration has not changed).
 The specific problem is printed in the log message.
 
-% AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_FORMAT_ERROR Error in data source configuration format: %1
+% AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_ERROR Internal error setting up data source: %1
 The thread for maintaining data source clients has received a command to
-reconfigure, but the parameter data is not in the expected format (a list of
-maps). This should have been validated, and this error is most likely to be
-a bug in the system, but it is probably a good idea to verify the
-configuration itself. The system is still running with the data sources that
-were previously configured (i.e. as if the configuration has not changed),
-and the configuration data needs to be checked.
+reconfigure, but raised an exception while setting up data sources. This is
+most likely an internal error in a data source, or a bug in the data source
+or the system itself, but it is probably a good idea to verify the
+configuration first. The system is still running with the data sources that
+were previously configured (i.e. as if the configuration has not changed).
 The specific problem is printed in the log message.
 
 % AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_STARTED data source reconfiguration started
@@ -111,13 +112,6 @@ reconfigure, and has now started this process.
 The thread for maintaining data source clients has finished reconfiguring
 the data source clients, and is now running with the new configuration.
 
-% AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_UNKNOWN_ERROR unknown uncaught exception in data source reconfigure
-The thread for maintaining data source clients has received a command to
-reconfigure, but raised an unknown exception while reconfiguring. This is a
-bug in the data source. The system is still running with the data sources
-that were previously configured (i.e. as if the configuration has not
-changed), and the configuration data needs to be checked.
-
 % AUTH_DATASRC_CLIENTS_BUILDER_STARTED data source builder thread started
 A separate thread for maintaining data source clients has been started.
 
diff --git a/src/bin/auth/datasrc_clients_mgr.h b/src/bin/auth/datasrc_clients_mgr.h
index 0fdfa81..28ddab5 100644
--- a/src/bin/auth/datasrc_clients_mgr.h
+++ b/src/bin/auth/datasrc_clients_mgr.h
@@ -255,18 +255,18 @@ private:
                 LOG_ERROR(auth_logger,
                     AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_CONFIG_ERROR).
                     arg(config_error.what());
-            } catch (const data::TypeError& type_error) {
+            } catch (const datasrc::DataSourceError& ds_error) {
                 LOG_ERROR(auth_logger,
-                    AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_FORMAT_ERROR).
-                    arg(type_error.what());
-            } catch (const std::exception& exc) {
+                    AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_DATASRC_ERROR).
+                    arg(ds_error.what());
+            } catch (const isc::Exception& isc_error) {
                 LOG_ERROR(auth_logger,
                     AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_ERROR).
-                    arg(exc.what());
-            } catch (...) {
-                LOG_ERROR(auth_logger,
-                    AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_UNKNOWN_ERROR);
+                    arg(isc_error.what());
             }
+            // other exceptions are propagated, see
+            // http://bind10.isc.org/ticket/2210#comment:13
+
             // old clients_map_ data is released by leaving scope
         }
     }



More information about the bind10-changes mailing list