本文主要是介绍Openstack -- nova-compute服务启动,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、/usr/bin/nova-compute
#从nova模块导入/nova/cmd/compute main函数启动服务1 #!/usr/bin/python2 # PBR Generated from u'console_scripts'3 4 import sys5 6 from nova.cmd.compute import main7 8 9 if __name__ == "__main__":
10 sys.exit(main())
2、 main函数
def main():config.parse_args(sys.argv)logging.setup(CONF, 'nova')priv_context.init(root_helper=shlex.split(utils.get_root_helper()))utils.monkey_patch()objects.register_all()# Ensure os-vif objects are registered and plugins loadedos_vif.initialize()gmr.TextGuruMeditation.setup_autorun(version)cmd_common.block_db_access('nova-compute')objects_base.NovaObject.indirection_api = conductor_rpcapi.ConductorAPI()server = service.Service.create(binary='nova-compute',topic=CONF.compute_topic)service.serve(server)serv
这篇关于Openstack -- nova-compute服务启动的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!