def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") # PF9 begin logging_pf9.setup("nova") # PF9 end utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-conductor', topic=CONF.conductor.topic, manager=CONF.conductor.manager) # PF9 change: if CONF.conductor.workers is None: # If unset, use openstack default of cpu count workers = processutils.get_worker_count() else: workers = CONF.conductor.workers # If set to 0, set it to half of cpu count if workers == 0: workers = (processutils.get_worker_count() + 1) / 2 # PF9 end service.serve(server, workers=workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() server = service.Service.create(binary='nova-cert', topic=CONF.cert_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") wsgi_server = xvp_proxy.get_wsgi_server() service.serve(wsgi_server) service.wait()
def main(): """加载和设置配置参数,有两点需要注意: 1. 调用rpc.set_defaults设置默认的exchange为nova,如果不设置则为 openstack 2. 调用rpc.init设置Transport和Notifier,Transport是 oslo_messaging/transport.py/Transport实例,我采用的是默认的 rpc_backend=rabbit,所以Transport采用的driver=oslo_messaging/ _drivers/impl_rabbit.py/RabbitDriver;Notifier是一个通知消息发 送器,它借助Transport完成通知消息的发送 """ config.parse_args(sys.argv) logging.setup('nova') utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) if not CONF.conductor.use_local: block_db_access() objects_base.NovaObject.indirection_api = \ conductor_rpcapi.ConductorAPI() """调用类方法nova/service.py/Service.create创建Service服务对象 输入参数topic = compute, db_allowd = false;`create`方法是一个 类方法(@classmethod),它首先基于输入参数和(/etc/nova.conf中的选 项)设置配置,然后创建一个Service对象并返回给调用者 """ server = service.Service.create(binary='nova-compute', topic=CONF.compute_topic, db_allowed=CONF.conductor.use_local) """调用server方法启动服务并调用wait方法等待服务启动完成,serve方法创 建Launcher服务启动实例对象(这里是ServiceLauncher)来启动服务, 但最终会调用server.start方法启动服务。 """ service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) if not CONF.conductor.use_local: block_db_access() objects_base.NovaObject.indirection_api = \ conductor_rpcapi.ConductorAPI() else: LOG.warning( _LW('Conductor local mode is deprecated and will ' 'be removed in a subsequent release')) LOG.warning( _LW('Nova network is deprecated and will be removed ' 'in the future')) server = service.Service.create(binary='nova-network', topic=CONF.network_topic, db_allowed=CONF.conductor.use_local) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") server = service.Service.create(binary='nova-consoleauth', topic=CONF.consoleauth_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() server = service.WSGIService('ec2', max_url_len=16384) service.serve(server, workers=server.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() server = s3server.get_wsgi_server() service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() server = service.WSGIService("ec2", max_url_len=16384) service.serve(server, workers=server.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() server = service.WSGIService('osapi_compute') service.serve(server, workers=server.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") if not CONF.cells.enable: LOG.error( _LE('Nova network is deprecated and not supported ' 'except as required for CellsV1 deployments.')) return 1 utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) cmd_common.block_db_access('nova-network') objects_base.NovaObject.indirection_api = conductor_rpcapi.ConductorAPI() LOG.warning( _LW('Nova network is deprecated and will be removed ' 'in the future')) server = service.Service.create(binary='nova-network', topic=CONF.network_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") # NOTE(stephenfin): Yes, this is silly, but the whole thing is being # removed and we want to make the diff in individual changes as small as # possible if True: LOG.error('Nova network is deprecated and not supported ' 'except as required for CellsV1 deployments.') return 1 objects.register_all() gmr_opts.set_defaults(CONF) gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) cmd_common.block_db_access('nova-network') objects_base.NovaObject.indirection_api = conductor_rpcapi.ConductorAPI() LOG.warning('Nova network is deprecated and will be removed ' 'in the future') server = service.Service.create(binary='nova-network', topic=network_rpcapi.RPC_TOPIC, manager=CONF.network_manager) service.serve(server) service.wait()
def main(): objects.register_all() config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() server = service.Service.create(binary="nova-conductor", topic=CONF.conductor.topic, manager=CONF.conductor.manager) service.serve(server, workers=CONF.conductor.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() should_use_ssl = 'osapi_compute' in CONF.enabled_ssl_apis server = service.WSGIService('osapi_compute', use_ssl=should_use_ssl) service.serve(server, workers=server.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") objects.register_all() server = service.Service.create(binary='nova-console', topic=CONF.console_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(config.CONF, "nova") gmr.TextGuruMeditation.setup_autorun(version) wsgi_server = xvp_proxy.get_wsgi_server() service.serve(wsgi_server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") gmr.TextGuruMeditation.setup_autorun(version) wsgi_server = xvp_proxy.get_wsgi_server() service.serve(wsgi_server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() should_use_ssl = 'ec2' in CONF.enabled_ssl_apis server = service.WSGIService('ec2', use_ssl=should_use_ssl, max_url_len=16384) service.serve(server, workers=server.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup('nova') utils.monkey_patch() server = service.Service.create(binary='nova-cells', topic=CONF.cells.topic, manager=CONF.cells.manager) service.serve(server) service.wait()
def main(): objects.register_all() config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() server = service.Service.create(binary='nova-sample', topic='sample', manager='nova.sample.manager.SampleManager') service.serve(server, workers=CONF.conductor.workers) service.wait()
def main(): objects.register_all() config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() server = service.Service.create(binary='nova-android', topic=CONF.android.topic, manager='nova.android.agent.manager.AndroidManager') service.serve(server, workers=CONF.conductor.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(config.CONF, "nova") gmr_opts.set_defaults(CONF) gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) wsgi_server = xvp_proxy.get_wsgi_server() service.serve(wsgi_server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary="nova-consoleauth", topic=CONF.consoleauth_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-console', topic=CONF.console_topic) service.serve(server) service.wait()
def main(): objects.register_all() config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() server = service.Service.create(binary='nova-conductor', topic=CONF.conductor.topic, manager=CONF.conductor.manager) service.serve(server, workers=CONF.conductor.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-cert', topic=CONF.cert_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() objects.register_all() server = service.Service.create(binary='nova-scheduler', topic=CONF.scheduler_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() gmr.TextGuruMeditation.setup_autorun(version) server = s3server.get_wsgi_server() service.serve(server) service.wait()
def main(): objects.register_all() config.parse_args(sys.argv) logging.setup("ccbilling") utils.monkey_patch() server = billing_service.Service.create(binary='cc-billing', topic=CONF.ccbilling.topic, manager=CONF.ccbilling.manager) service.serve(server, workers=CONF.ccbilling.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-consoleauth', topic=CONF.consoleauth_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary="nova-scheduler", topic=CONF.scheduler_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-loadbalancer') service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() objects.register_all() server = service.Service.create(binary='nova-conductor', topic=CONF.conductor.topic, manager=CONF.conductor.manager) workers = CONF.conductor.workers or processutils.get_worker_count() service.serve(server, workers=workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") objects.register_all() gmr_opts.set_defaults(CONF) gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) server = service.Service.create(binary='nova-console', topic=console_rpcapi.RPC_TOPIC) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) should_use_ssl = 'osapi_compute' in CONF.enabled_ssl_apis server = service.WSGIService('osapi_compute', use_ssl=should_use_ssl) service.serve(server, workers=server.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary="nova-conductor", topic=CONF.conductor.topic, manager=CONF.conductor.manager) workers = CONF.conductor.workers or processutils.get_worker_count() service.serve(server, workers=workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() objects.register_all() objects.Service.enable_min_version_cache() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-scheduler', topic=scheduler_rpcapi.RPC_TOPIC) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() objects.register_all() objects.Service.enable_min_version_cache() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-scheduler', topic=CONF.scheduler_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(CONF, 'nova') utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-cells', topic=CONF.cells.topic, manager=CONF.cells.manager) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup("nova") utils.monkey_patch() if not CONF.conductor.use_local: objects_base.NovaObject.indirection_api = \ conductor_rpcapi.ConductorAPI() should_use_ssl = 'metadata' in CONF.enabled_ssl_apis server = service.WSGIService('metadata', use_ssl=should_use_ssl) service.serve(server, workers=server.workers) service.wait()
def main(): config.parse_args(sys.argv) logging.setup('nova') utils.monkey_patch() if not CONF.conductor.use_local: block_db_access() server = service.Service.create(binary='nova-compute', topic=CONF.compute_topic, db_allowed=False) service.serve(server) service.wait()
def main(): CONF = config.CONF try: config.parse_config(sys.argv, 'nova') log.setup('powervc') utils.monkey_patch() server = service.Service.create(manager=CONF.powervc.powervc_manager, binary='nova-powervc') service.serve(server) service.wait() except Exception: traceback.print_exc() raise