nova分析(2)—— nova-all
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的更多相关文章
- nova分析(10)—— nova-rootwrap
一.nova-rootwrap的作用 部署玩过openstack的都应该知道,它会生成一个nova用户来管理所有服务.nova身份在linux中属于普通用户级别,避免了一些需要root身份运行的操作, ...
- 在Openstack H版部署Nova Cell 时 ,终端输入nova service-list 和 nova host-list 命令将报错
关于Cell的基本介绍,可以参考贤哥的一篇文章: [OpenStack]G版中关于Nova的Cell http://blog.csdn.net/lynn_kong/article/details/8 ...
- 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设备直接分 ...
- openstack私有云布署实践【11.3 计算nova - compute节点-nova用户免密登录(用于云主机冷迁移+扩展云主机大小)】
云主机迁移+扩展云主机大小 ,官方说它依赖nova用户之间的免密登录.确保每个resion区域的compute节点服务器他们可以相互SSH免密 compute1-7 他们相互SSH免密 k ...
- nova分析(7)—— nova-scheduler
Nova-Scheduler主要完成虚拟机实例的调度分配任务,创建虚拟机时,虚拟机该调度到哪台物理机上,迁移时若没有指定主机,也需要经过scheduler.资源调度是云平台中的一个很关键问题,如何做到 ...
- nova分析(5)—— nova-conductor
nova-conductor是nova-compute之上的一个服务,这个服务比较简单,主要封装了DB访问和动态迁移相关的代码.转来一篇文章看看它是如何工作的. 更新记录:1. 2013.4.19 ...
- nova分析(6)—— nova service启动过程
Nova project下面具有多个service,api,compute,sceduler等等,他们的启动过程都几乎类似,这一篇博客就详细记录nova-sceduler的启动过程.文章中贴出的源码都 ...
- nova分析(3)—— nova-api
nova-api是nova对外提供Restful API的服务,Horizon.novaclient等均通过该api与nova进行通信. nova其实对外提供了多个api服务,包括下面这些服务: no ...
- nova分析(8)—— nova-compute
nova-compute是管理和配置虚拟机的入口,在所有compute机器上都需要该服务来创建和管理虚拟机. nova-compute服务的入口在 nova.cmd.compute:main ,其启动 ...
- nova分析(9)—— nova-novncproxy
nova提供了novncproxy代理支持用户通过vnc来访问虚拟机,用户可以通过websocket.java客户端或者spicehtml5来访问.通过websket访问虚拟机的功能已经集成到hori ...
随机推荐
- Ensemble Approaches分类技术
所谓ensemble learning,简单来说,是指综合多种基础模型或弱分类器来完成最终的决策的机器学习方法. Bagging和Boosting(之前所提到的Adaboost)都属于这类方法. Co ...
- 详解for循环(各种用法)
常见的for循环一般是一下代码这种结构: for (int i = 0; i < 100; i++){ Console.WriteLine(i);} 或者递减的: ...
- 织梦dedecms 用交叉栏目时arclist标签调用不出内容文章的问题(纯转载)
本文转自:http://www.cnblogs.com/cnteam/articles/4056702.html 最近用了交叉栏目发现当为手动指定交叉栏目ID时用arclist标签不能调出相关文章最后 ...
- android中获取string字符串的方法
比如在arrays.xml里: <!--leo added for KYLIN-496--> <string-array name="reboot_item"&g ...
- 学习iOS的一些网站收藏
1,CocoaChina:http://www.cocoachina.com/ 2,Code4App:http://code4app.com/ 3,梦维:http://www.dreamingwish ...
- 一个好用的Log管理类
public class L { private static String className; //所在的类名 private static String methodName; //所在的方法名 ...
- 转ORA-28002: the password will expire within 7 days 解决方法
最后一步要改密码,否则还会报错. 1. 查看用户的profile设置: SELECT username,profile FROM dba_users; 一般用户的profile设置都为DEFAULT. ...
- MySQL基于mysqldump及lvmsnapshot备份恢复
一.备份对象 数据 配置文件 代码:存储过程,存储函数,触发器 跟复制相关的配置 二进制日志文件 二.备份工具 mysqldump:逻辑备份工具 InnoDB热备.MyISAM温备.Aria温备 备份 ...
- HDU 2072 单词数
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=2072 普通解法: /* HDU 2072 单词数 --- 字符串处理 */ #include < ...
- Java static block static constructor , static field
http://stackoverflow.com/questions/7121213/singleton-instantiation http://docs.oracle.com/javase/spe ...