同时发布于: http://leiqzhang.com/2014/01/2014-01-09-nova-scheduler-service-initialization/
NOVA-SCHEDULER服务启动流程
前提
- 对Nova的整体结构已经有所理解
- 基于stable/havana分支
- 基于Redhat的RDO库进行的环境安装,基于CentOS 6.4
- 主机名为controller
内容
- openstack-nova-scheduler服务启动流程
- MessageQueue的相关知识及在scheduler服务启动过程中的涉及的行为
执行结果
根据之前对Noah系统结构的理解,在scheduler启动过程中,会和MessageQueue交互,创建相应的Exchange和Consumer。
启动前的MessageQueue的状态:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
#rabbitmqctl list_exchanges name type durable internal Listing exchanges ... direct true false amq.direct direct true false amq.fanout fanout true false amq.headers headers true false amq.match headers true false amq.rabbitmq.log topic true false amq.rabbitmq.trace topic true false amq.topic topic true false ...done. #rabbitmqctl list_bindings source_name source_kind destination_name destination_kind routing_key Listing bindings ... ...done. #rabbitmqctl list_connections pid name port host peer_port peer_host state channels protocol Listing connections ... ...done. #rabbitmqctl list_channels pid connection name number consumer_count Listing channels ... ...done. #rabbitmqctl list_consumers Listing consumers ... ...done. |
由上可知,在Scheduler启动前,只有RabbitMQ-Server默认创建的一些exchange,而binding、connection、channel和consumer均为空。
现在启动Scheduler服务:
1 |
service openstack-nova-scheduler start |
启动成功后,再次查看MQ的状态如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
#rabbitmqctl list_exchanges name type durable internal
Listing exchanges |