nova-all是一个用来启动所有nova服务的辅助脚本,注意只是启动所有服务,不包括停止和重启等功能。

nova-all的入口在 nova.cmd.all:main ,脚本也比较简单,这儿就贴下代码了

def main():
# 命令行参数解析,实际上命令行参数并没有使用
config.parse_args(sys.argv)
logging.setup("nova")
LOG = logging.getLogger('nova.all')
utils.monkey_patch()
objects.register_all()
launcher = service.process_launcher() # 启动API以提供Rest服务,也就是nova-api(以WSGIService方式启动)
for api in CONF.enabled_apis:
try:
should_use_ssl = api in CONF.enabled_ssl_apis
server = service.WSGIService(api, use_ssl=should_use_ssl)
launcher.launch_service(server, workers=server.workers or 1)
except (Exception, SystemExit):
LOG.exception(_('Failed to load %s') % '%s-api' % api) # 启动s3server(基于本地文件实现S3式的存储服务)
# 启动xvp_proxy(VNC代理,支持基于java的vnc客户端)
# 这两个服务都是以wsgi.Server方式启动
for mod in [s3server, xvp_proxy]:
try:
launcher.launch_service(mod.get_wsgi_server())
except (Exception, SystemExit):
LOG.exception(_('Failed to load %s') % mod.__name__) # 其他的服务以Service方式启动
for binary in ['nova-compute', 'nova-network', 'nova-scheduler',
'nova-cert', 'nova-conductor']: # FIXME(sirp): Most service configs are defined in nova/service.py, but
# conductor has set a new precedent of storing these configs
# nova/<service>/api.py.
#
# We should update the existing services to use this new approach so we
# don't have to treat conductor differently here.
if binary == 'nova-conductor':
topic = CONF.conductor.topic
manager = CONF.conductor.manager
else:
topic = None
manager = None try:
launcher.launch_service(service.Service.create(binary=binary,
topic=topic,
manager=manager))
except (Exception, SystemExit):
LOG.exception(_('Failed to load %s'), binary)
launcher.wait()

nova分析(2)—— nova-all的更多相关文章

  1. nova分析(10)—— nova-rootwrap

    一.nova-rootwrap的作用 部署玩过openstack的都应该知道,它会生成一个nova用户来管理所有服务.nova身份在linux中属于普通用户级别,避免了一些需要root身份运行的操作, ...

  2. 在Openstack H版部署Nova Cell 时 ,终端输入nova service-list 和 nova host-list 命令将报错

    关于Cell的基本介绍,可以参考贤哥的一篇文章: [OpenStack]G版中关于Nova的Cell  http://blog.csdn.net/lynn_kong/article/details/8 ...

  3. KVM 介绍(8):使用 libvirt 迁移 QEMU/KVM 虚机和 Nova 虚机 [Nova Libvirt QEMU/KVM Live Migration]

    学习 KVM 的系列文章: (1)介绍和安装 (2)CPU 和 内存虚拟化 (3)I/O QEMU 全虚拟化和准虚拟化(Para-virtulizaiton) (4)I/O PCI/PCIe设备直接分 ...

  4. openstack私有云布署实践【11.3 计算nova - compute节点-nova用户免密登录(用于云主机冷迁移+扩展云主机大小)】

    云主机迁移+扩展云主机大小 ,官方说它依赖nova用户之间的免密登录.确保每个resion区域的compute节点服务器他们可以相互SSH免密   compute1-7     他们相互SSH免密 k ...

  5. nova分析(7)—— nova-scheduler

    Nova-Scheduler主要完成虚拟机实例的调度分配任务,创建虚拟机时,虚拟机该调度到哪台物理机上,迁移时若没有指定主机,也需要经过scheduler.资源调度是云平台中的一个很关键问题,如何做到 ...

  6. nova分析(5)—— nova-conductor

    nova-conductor是nova-compute之上的一个服务,这个服务比较简单,主要封装了DB访问和动态迁移相关的代码.转来一篇文章看看它是如何工作的. 更新记录:1. 2013.4.19   ...

  7. nova分析(6)—— nova service启动过程

    Nova project下面具有多个service,api,compute,sceduler等等,他们的启动过程都几乎类似,这一篇博客就详细记录nova-sceduler的启动过程.文章中贴出的源码都 ...

  8. nova分析(3)—— nova-api

    nova-api是nova对外提供Restful API的服务,Horizon.novaclient等均通过该api与nova进行通信. nova其实对外提供了多个api服务,包括下面这些服务: no ...

  9. nova分析(8)—— nova-compute

    nova-compute是管理和配置虚拟机的入口,在所有compute机器上都需要该服务来创建和管理虚拟机. nova-compute服务的入口在 nova.cmd.compute:main ,其启动 ...

  10. nova分析(9)—— nova-novncproxy

    nova提供了novncproxy代理支持用户通过vnc来访问虚拟机,用户可以通过websocket.java客户端或者spicehtml5来访问.通过websket访问虚拟机的功能已经集成到hori ...

随机推荐

  1. Wamp安装使用+Git for Windows

    相信很多朋友都曾在windows上做过web开发,我们常用的Web应用程序平台是:Apache+Mysql+Perl/PHP/Python,在windows下集成称为WAMP.web开发新手有时候由于 ...

  2. 1password密码文件重装后恢复

    因为重装系统,加上Time machine硬盘损坏. 只能从之前零散Time machine的恢复数据中找到最近的一个备份. 1password是会自己执行备份的,起备份文件在 ~/Library/C ...

  3. CSS2伪类选择器要点

    有四个选择器,分别是 hover:鼠标悬停 link:链接不能使用时 visited:链接被点击后 active:链接被点击时,如果鼠标不放,就会一直触发active属性 link在w3c中记录为链接 ...

  4. Android中GC_EXTERNAL_ALLOC的含义

    GC_FOR_MALLOC means that the GC was triggered because there wasn't enough memory left on the heap to ...

  5. FTP方式获取文件步骤

    1.在浏览器地址行输入FTP连接地址 2.进入FTP端之后,点击“檢視”-“在windows資源總覽中開啟FTP站臺”,這樣就可以打開FTP端的文件了

  6. AudioUnit,AudioQueue之争

    最近在修改调试一个webrtc的问题,困扰了好久,故先记录下来,有成果了就发出来.问题1 使用webrtc源码做iOS上的VOIP通讯时(iOS侧接口用的AudioUnit),如果通话中被CS域来电打 ...

  7. UVa 839 天平

    原题链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem ...

  8. leetcode 152. Maximum Product Subarray --------- java

    Find the contiguous subarray within an array (containing at least one number) which has the largest ...

  9. Activity——思维导图

  10. HDU-5781 ATM Mechine(概率DP)

    题目大意:某个未知整数x等概率的分布在[0,k]中.每次你都可以从这个整数中减去一个任意整数y,如果x>=y,那么x=x-y,操作次数累计加1:否则,将会受到一次错误提示.当错误提示超过w次,将 ...