def main(): # NOTE(lucasagomes): Safeguard to prevent 'ironic.conductor.manager' # from being imported prior to the configuration options being loaded. # If this happened, the periodic decorators would always use the # default values of the options instead of the configured ones. For # more information see: https://bugs.launchpad.net/ironic/+bug/1562258 # and https://bugs.launchpad.net/ironic/+bug/1279774. assert 'ironic.conductor.manager' not in sys.modules # Parse config file and command line options, then start logging ironic_service.prepare_service(sys.argv) if gmr is not None: gmr.TextGuruMeditation.setup_autorun(version) else: LOG.debug('Guru meditation reporting is disabled ' 'because oslo.reports is not installed') mgr = rpc_service.RPCService(CONF.host, 'ironic.conductor.manager', 'ConductorManager') issue_startup_warnings(CONF) profiler.setup('ironic_conductor', CONF.host) launcher = service.launch(CONF, mgr, restart_method='mutate') launcher.wait()
def main(): # NOTE(lucasagomes): Safeguard to prevent 'ironic.conductor.manager' # from being imported prior to the configuration options being loaded. # If this happened, the periodic decorators would always use the # default values of the options instead of the configured ones. For # more information see: https://bugs.launchpad.net/ironic/+bug/1562258 # and https://bugs.launchpad.net/ironic/+bug/1279774. assert 'ironic.conductor.manager' not in sys.modules # Parse config file and command line options, then start logging ironic_service.prepare_service(sys.argv) mgr = rpc_service.RPCService(CONF.host, 'ironic.conductor.manager', 'ConductorManager') _check_auth_options(CONF) launcher = service.launch(CONF, mgr) launcher.wait()
def setUp(self): super(TestRPCService, self).setUp() host = "fake_host" mgr_module = "ironic.conductor.manager" mgr_class = "ConductorManager" self.rpc_svc = rpc_service.RPCService(host, mgr_module, mgr_class)