diff options
-rw-r--r-- | openstack/common/service.py | 4 | ||||
-rw-r--r-- | tests/unit/test_service.py | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/openstack/common/service.py b/openstack/common/service.py index 05060ca..002d478 100644 --- a/openstack/common/service.py +++ b/openstack/common/service.py @@ -275,6 +275,10 @@ class ProcessLauncher(object): def wait(self): """Loop waiting on children to die and respawning as necessary""" + + LOG.debug(_('Full set of CONF:')) + CONF.log_opt_values(LOG, std_logging.DEBUG) + while self.running: wrap = self._wait_child() if not wrap: diff --git a/tests/unit/test_service.py b/tests/unit/test_service.py index fce6b45..59f3145 100644 --- a/tests/unit/test_service.py +++ b/tests/unit/test_service.py @@ -29,10 +29,11 @@ from eventlet import greenthread from openstack.common import cfg from openstack.common.gettextutils import _ from openstack.common import log as logging +from openstack.common.notifier import api as notifier_api from openstack.common import service from tests import utils - +CONF = cfg.CONF LOG = logging.getLogger(__name__) @@ -108,7 +109,16 @@ class ServiceLauncherTest(utils.BaseTestCase): self.assertEqual(len(workers), self.workers) return workers + def setUp(self): + super(ServiceLauncherTest, self).setUp() + # FIXME(markmc): Ugly hack to workaround bug #1073732 + CONF.unregister_opts(notifier_api.notifier_opts) + # NOTE(markmc): ConfigOpts.log_opt_values() uses CONF.config-file + CONF(args=[], default_config_files=[]) + def tearDown(self): + CONF.reset() + CONF.register_opts(notifier_api.notifier_opts) if self.pid: # Make sure all processes are stopped os.kill(self.pid, signal.SIGTERM) |