07.计算Nova→3.场景学习→4.Start Instance

返回总目录

背景:

07.计算Nova→3.场景学习→4.Start Instance_第1张图片 paste-171858821382147.jpg

07.计算Nova→3.场景学习→4.Start Instance_第2张图片



描述 详细
  1. 向 nova-api 发送请求
    1. 客户(可以是 OpenStack 最终用户,也可以是其他程序)向API(nova-api)发送请求:“帮我启动这个 Instance”paste-157238752706563.jpg
    2. 查看n-api的日志。
1
2
3
4
5
6
Jun 18 15:06:00 controller devstack@n-api.service[14704]: 
DEBUG nova.compute.api
[None admin admin]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]

{{(pid=14738) 1
  1. nova-api 发送消息
    1. nova-api 向 Messaging(RabbitMQ)发送了一条消息:“启动这个 Instance”。查看源代码 /opt/stack/nova/nova/compute/api.py 的 2281 行,方法是 start。
    2. self.compute_rpcapi.start_instance() 的作用就是向 RabbitMQ 上 nova-compute 的消息队列里发送一条 start instance 的消息。
07.计算Nova→3.场景学习→4.Start Instance_第3张图片
  1. nova-compute 执行操作:
    1. 查看计算节点上n-cpu的日志
开始启动
1
2
3
4
5
6
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]
network_info=[{"profile": {},
{{(pid=5685) _get_guest_xml /opt/stack/nova/nova/virt/libvirt/driver.
1
2
3
4
5
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]
xml=<domain type="kvm">
准备 instance 镜像文件
1
2
3
4
5
6
7
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG oslo_concurrency.processutils
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
CMD "/usr/bin/python -m oslo_concurrency.prlimit --as=1073741824 -...

...
{{(pid=5685) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:409
1
2
3
4
5
6
7
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG oslo_concurrency.processutils
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
CMD "/usr/bin/python -m oslo_concurrency.prlimit --as=1073741824 --cpu=30 -- env LC_ALL=C LANG=C

--force-share" returned: 0 in 0.036s
{{(pid=5685) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:409
准备虚拟网卡
1
2
3
4
5
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
vif_type=bridge instance=Instance(access_ip_v4=None,access_ip_v6=None,architecture=Non...
{{(pid=5685) plug /opt/stack/nova/nova/virt/libvirt/vif.py:785
1
2
3
Jun 18 15:06:01 compute nova-compute[5685]: 
INFO os_vif [None req-b7d17888-d21d-40c5-a918-e20d02929215
admin admin]
vif是virtual interface(虚拟网卡)的缩写
成功启动
1
2
3
4
5
Jun 18 15:06:02 compute nova-compute[5685]: 
INFO nova.compute.manager
[None req-55b92b99-57ee-4f39-a9dd-63dc885efbb9 None None]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]

resume rɪ'zjum (使)重新开始;(使)继续进行
1
2
3
4
Jun 18 15:06:02 compute nova-compute[5685]: 
INFO nova.virt.libvirt.driver [-]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]

你可能感兴趣的:(07.计算Nova→3.场景学习→4.Start Instance)