diff --git a/openstack/common/service.py b/openstack/common/service.py index f91714e..645a4b0 100644 --- a/openstack/common/service.py +++ b/openstack/common/service.py @@ -39,13 +39,11 @@ from oslo.config import cfg from openstack.common import eventlet_backdoor from openstack.common.gettextutils import _LE, _LI, _LW -from openstack.common import importutils from openstack.common import log as logging from openstack.common import systemd from openstack.common import threadgroup -rpc = importutils.try_import('openstack.common.rpc') CONF = cfg.CONF LOG = logging.getLogger(__name__) @@ -180,12 +178,6 @@ class ServiceLauncher(Launcher): status = exc.code finally: self.stop() - if rpc: - try: - rpc.cleanup() - except Exception: - # We're shutting down, so it doesn't matter at this point. - LOG.exception(_LE('Exception during rpc cleanup.')) return status, signo diff --git a/tests/unit/test_service.py b/tests/unit/test_service.py index 8d469cb..51f3168 100644 --- a/tests/unit/test_service.py +++ b/tests/unit/test_service.py @@ -38,7 +38,6 @@ from six.moves import mox from openstack.common import eventlet_backdoor from openstack.common.fixture import config from openstack.common import log as logging -from openstack.common.notifier import api as notifier_api from openstack.common import service @@ -81,12 +80,9 @@ class ServiceTestBase(test_base.BaseTestCase): def setUp(self): super(ServiceTestBase, self).setUp() self.CONF = self.useFixture(config.Config()).conf - # FIXME(markmc): Ugly hack to workaround bug #1073732 - self.CONF.unregister_opts(notifier_api.notifier_opts) # NOTE(markmc): ConfigOpts.log_opt_values() uses CONF.config-file self.CONF(args=[], default_config_files=[]) self.addCleanup(self.CONF.reset) - self.addCleanup(self.CONF.register_opts, notifier_api.notifier_opts) self.addCleanup(self._reap_pid) def _reap_pid(self):