Esempio n. 1
0
def launch_engine():
    profiler.setup('mistral-engine', cfg.CONF.engine.host)

    engine_v2 = def_eng.DefaultEngine(rpc.get_engine_client())

    engine_endpoint = rpc.EngineServer(engine_v2)

    # Setup scheduler in engine.
    db_api.setup_db()
    scheduler.setup()

    # Setup expiration policy
    expiration_policy.setup()

    engine_server = rpc.get_rpc_server_driver()(
        rpc_utils.get_rpc_info_from_oslo(CONF.engine)
    )
    engine_server.register_endpoint(engine_endpoint)

    engine_v2.register_membership()

    try:
        engine_server.run()
    except (KeyboardInterrupt, SystemExit):
        pass
    finally:
        print("Stopping engine service...")
Esempio n. 2
0
def launch_engine():
    profiler.setup('mistral-engine', cfg.CONF.engine.host)

    engine_v2 = def_eng.DefaultEngine(rpc.get_engine_client())

    engine_endpoint = rpc.EngineServer(engine_v2)

    # Setup scheduler in engine.
    db_api.setup_db()
    scheduler.setup()

    # Setup expiration policy
    expiration_policy.setup()

    engine_server = rpc.get_rpc_server_driver()(
        rpc_utils.get_rpc_info_from_oslo(CONF.engine))
    engine_server.register_endpoint(engine_endpoint)

    engine_v2.register_membership()

    try:
        # Note(ddeja): Engine needs to be run in default (blocking) mode
        # since using another mode may lead to deadlock.
        # See https://review.openstack.org/#/c/356343/
        # for more info.
        engine_server.run()
    except (KeyboardInterrupt, SystemExit):
        pass
    finally:
        print("Stopping engine service...")
Esempio n. 3
0
    def start(self):
        super(ExecutorServer, self).start()

        if self._setup_profiler:
            profiler_utils.setup('mistral-executor', cfg.CONF.executor.host)

        # Initialize and start RPC server.

        self._rpc_server = rpc.get_rpc_server_driver()(cfg.CONF.executor)
        self._rpc_server.register_endpoint(self)

        self._rpc_server.run(executor='threading')

        self._notify_started('Executor server started.')
Esempio n. 4
0
    def start(self):
        super(EventEngineServer, self).start()

        profiler_utils.setup('mistral-event-engine',
                             cfg.CONF.event_engine.host)

        # Initialize and start RPC server.

        self._rpc_server = rpc.get_rpc_server_driver()(cfg.CONF.event_engine)
        self._rpc_server.register_endpoint(self)

        self._rpc_server.run()

        self._notify_started('Event engine server started.')
Esempio n. 5
0
    def start(self):
        super(ExecutorServer, self).start()

        if self._setup_profiler:
            profiler_utils.setup('mistral-executor', cfg.CONF.executor.host)

        # Initialize and start RPC server.

        self._rpc_server = rpc.get_rpc_server_driver()(
            rpc_utils.get_rpc_info_from_oslo(cfg.CONF.executor)
        )
        self._rpc_server.register_endpoint(self)

        self._rpc_server.run(executor='threading')

        self._notify_started('Executor server started.')
Esempio n. 6
0
def launch_executor():
    profiler.setup('mistral-executor', cfg.CONF.executor.host)

    executor_v2 = def_executor.DefaultExecutor(rpc.get_engine_client())
    executor_endpoint = rpc.ExecutorServer(executor_v2)

    executor_server = rpc.get_rpc_server_driver()(
        rpc_utils.get_rpc_info_from_oslo(CONF.executor))
    executor_server.register_endpoint(executor_endpoint)

    executor_v2.register_membership()

    try:
        executor_server.run(executor='threading')
    except (KeyboardInterrupt, SystemExit):
        pass
    finally:
        print("Stopping executor service...")
Esempio n. 7
0
def launch_event_engine():
    profiler.setup('mistral-event-engine', cfg.CONF.event_engine.host)

    event_eng = event_engine.EventEngine(rpc.get_engine_client())
    endpoint = rpc.EventEngineServer(event_eng)

    event_engine_server = rpc.get_rpc_server_driver()(
        rpc_utils.get_rpc_info_from_oslo(CONF.event_engine))
    event_engine_server.register_endpoint(endpoint)

    event_eng.register_membership()

    try:
        event_engine_server.run()
    except (KeyboardInterrupt, SystemExit):
        pass
    finally:
        print("Stopping event_engine service...")
    def start(self):
        super(EventEngineServer, self).start()

        profiler_utils.setup(
            'mistral-event-engine',
            cfg.CONF.event_engine.host
        )

        # Initialize and start RPC server.

        self._rpc_server = rpc.get_rpc_server_driver()(
            rpc_utils.get_rpc_info_from_oslo(cfg.CONF.event_engine)
        )
        self._rpc_server.register_endpoint(self)

        self._rpc_server.run()

        self._notify_started('Event engine server started.')
Esempio n. 9
0
def launch_executor():
    profiler.setup('mistral-executor', cfg.CONF.executor.host)

    executor_v2 = def_executor.DefaultExecutor(rpc.get_engine_client())
    executor_endpoint = rpc.ExecutorServer(executor_v2)

    executor_server = rpc.get_rpc_server_driver()(
        rpc_utils.get_rpc_info_from_oslo(CONF.executor)
    )
    executor_server.register_endpoint(executor_endpoint)

    executor_v2.register_membership()

    try:
        executor_server.run()
    except (KeyboardInterrupt, SystemExit):
        pass
    finally:
        print("Stopping executor service...")
Esempio n. 10
0
def launch_event_engine():
    profiler.setup('mistral-event-engine', cfg.CONF.event_engine.host)

    event_eng = event_engine.EventEngine(rpc.get_engine_client())
    endpoint = rpc.EventEngineServer(event_eng)

    event_engine_server = rpc.get_rpc_server_driver()(
        rpc_utils.get_rpc_info_from_oslo(CONF.event_engine)
    )
    event_engine_server.register_endpoint(endpoint)

    event_eng.register_membership()

    try:
        event_engine_server.run()
    except (KeyboardInterrupt, SystemExit):
        pass
    finally:
        print("Stopping event_engine service...")
Esempio n. 11
0
    def start(self):
        super(EngineServer, self).start()

        db_api.setup_db()

        self._scheduler = scheduler.start()
        self._expiration_policy_tg = expiration_policy.setup()

        if self._setup_profiler:
            profiler_utils.setup('mistral-engine', cfg.CONF.engine.host)

        # Initialize and start RPC server.

        self._rpc_server = rpc.get_rpc_server_driver()(cfg.CONF.engine)
        self._rpc_server.register_endpoint(self)

        # Note(ddeja): Engine needs to be run in default (blocking) mode
        # since using another mode may leads to deadlock.
        # See https://review.openstack.org/#/c/356343 for more info.
        self._rpc_server.run(executor='blocking')

        self._notify_started('Engine server started.')