BIND 10 master, updated. 9e6570256e27c28b20a17fc34de5689ee4685091 [master] fix msqg socket file problem

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Oct 26 13:58:16 UTC 2011


The branch, master has been updated
       via  9e6570256e27c28b20a17fc34de5689ee4685091 (commit)
      from  3db6583d93c42b3cb01ac5619d59d19645bd60bf (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 9e6570256e27c28b20a17fc34de5689ee4685091
Author: Jelte Jansen <jelte at isc.org>
Date:   Wed Oct 26 15:56:56 2011 +0200

    [master] fix msqg socket file problem
    
    this problem surfaced when 1246 got merged; the ModuleCCSession start in bind10 actually relied on some environment variable leaking out (which 1246 fixed).
    This change makes it an explicit optional argument to ModuleCCSession (which can still be overridden by the environment variable)

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

Summary of changes:
 src/bin/bind10/bind10_src.py.in        |    3 ++-
 src/lib/python/isc/config/ccsession.py |   12 ++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in
index 15b9552..b0cd3a6 100755
--- a/src/bin/bind10/bind10_src.py.in
+++ b/src/bin/bind10/bind10_src.py.in
@@ -503,7 +503,8 @@ class BoB:
         self.log_starting("ccsession")
         self.ccs = isc.config.ModuleCCSession(SPECFILE_LOCATION, 
                                       self.config_handler,
-                                      self.command_handler)
+                                      self.command_handler,
+                                      socket_file = self.msgq_socket_file)
         self.ccs.start()
         self.log_started()
 
diff --git a/src/lib/python/isc/config/ccsession.py b/src/lib/python/isc/config/ccsession.py
index 11a13ec..c7eb8ad 100644
--- a/src/lib/python/isc/config/ccsession.py
+++ b/src/lib/python/isc/config/ccsession.py
@@ -143,7 +143,9 @@ class ModuleCCSession(ConfigData):
        callbacks are called when 'check_command' is called on the
        ModuleCCSession"""
        
-    def __init__(self, spec_file_name, config_handler, command_handler, cc_session=None, handle_logging_config=True):
+    def __init__(self, spec_file_name, config_handler, command_handler,
+                 cc_session=None, handle_logging_config=True,
+                 socket_file = None):
         """Initialize a ModuleCCSession. This does *NOT* send the
            specification and request the configuration yet. Use start()
            for that once the ModuleCCSession has been initialized.
@@ -165,6 +167,12 @@ class ModuleCCSession(ConfigData):
            logger manager when the logging configuration gets updated.
            The module does not need to do anything except intializing
            its loggers, and provide log messages. Defaults to true.
+
+           socket_file: If cc_session was none, this optional argument
+           specifies which socket file to use to connect to msgq. It
+           will be overridden by the environment variable
+           MSGQ_SOCKET_FILE. If none, and no environment variable is
+           set, it will use the system default.
         """
         module_spec = isc.config.module_spec_from_file(spec_file_name)
         ConfigData.__init__(self, module_spec)
@@ -175,7 +183,7 @@ class ModuleCCSession(ConfigData):
         self.set_command_handler(command_handler)
 
         if not cc_session:
-            self._session = Session()
+            self._session = Session(socket_file)
         else:
             self._session = cc_session
         self._session.group_subscribe(self._module_name, "*")




More information about the bind10-changes mailing list