Example #1
0
 def _rpc_conductor_client(self):
     # NOTE(aznashwan): it is unsafe to fork processes with pre-instantiated
     # oslo_messaging clients as the underlying eventlet thread queues will
     # be invalidated. Considering this class both serves from a "main
     # process" as well as forking child processes, it is safest to
     # re-instantiate the client every time:
     return rpc_conductor_client.ConductorClient()
Example #2
0
 def _register_worker_service(self):
     host = utils.get_hostname()
     binary = utils.get_binary_name()
     dummy_context = context.RequestContext(
         # TODO(aznashwan): we should ideally have a dedicated
         # user/pass/tenant just for service registration.
         # Either way, these values are not used and thus redundant.
         "coriolis",
         "admin")
     status = self.get_service_status(dummy_context)
     service_registration = (
         conductor_rpc_utils.check_create_registration_for_service(
             # NOTE: considering this only runs once on startup, we
             # instantiate a fresh conductor client instance for it:
             rpc_conductor_client.ConductorClient(),
             dummy_context,
             host,
             binary,
             constants.WORKER_MAIN_MESSAGING_TOPIC,
             enabled=True,
             providers=status['providers'],
             specs=status['specs']))
     LOG.info(
         "Worker service is successfully registered with the following "
         "parameters: %s", service_registration)
     self._service_registration = service_registration
     return service_registration
Example #3
0
 def __init__(self):
     self._rpc_client = rpc_client.ConductorClient()
     # Setup cron loop
     self._cron = cron.Cron()
     self._admin_ctx = context.get_admin_context()
     self._init_cron()
Example #4
0
 def __init__(self):
     self._rpc_client = rpc_client.ConductorClient()
Example #5
0
 def __init__(self):
     self._server = utils.get_hostname()
     self._rpc_conductor_client = rpc_conductor_client.ConductorClient()
Example #6
0
 def __init__(self, ctxt, task_id):
     self._ctxt = ctxt
     self._task_id = task_id
     self._rpc_conductor_client = rpc_conductor_client.ConductorClient()
Example #7
0
 def __init__(self):
     self._conductor_cli = conductor_rpc.ConductorClient()
     self._cron_cli = cron_rpc.ReplicaCronClient()
     self._worker_cli = worker_rpc.WorkerClient()
Example #8
0
 def __init__(self):
     self._rpc_conductor_client = rpc_conductor_client.ConductorClient()
     self._rpc_minion_manager_client = (
         rpc_minion_manager_client.MinionManagerClient())