基于openstack stein
api收到重启请求后, _action_reboot 调用 compute_api 进行reboot
1 | nova.api.openstack.compute.servers.ServersController |
软重启和硬重启,将请求通过rpc 传给了nova compute
1 | nova.compute.manager.ComputeManager |
变更虚机状态=> 查询虚机block_device_map 信息=>查询虚机network info, 最终调用libvirt 重启虚机
1 | def _reboot_instance(self, context, instance, block_device_info, |