Here's where the code should be updating the instance power state to "shutdown" during the periodic task:
https://github.com/openstack/nova/blob/658d468/nova/compute/manager.py#L7127
Here's where it should be calling the "stop" API:
https://github.com/openstack/nova/blob/658d468/nova/compute/manager.py#L7153
and here's where it should be updated to vm_state STOPPED upon the "stop" API being called:
https://github.com/openstack/nova/blob/658d468/nova/compute/manager.py#L2606
Here's where the code should be updating the instance power state to "shutdown" during the periodic task:
https:/ /github. com/openstack/ nova/blob/ 658d468/ nova/compute/ manager. py#L7127
Here's where it should be calling the "stop" API:
https:/ /github. com/openstack/ nova/blob/ 658d468/ nova/compute/ manager. py#L7153
and here's where it should be updated to vm_state STOPPED upon the "stop" API being called:
https:/ /github. com/openstack/ nova/blob/ 658d468/ nova/compute/ manager. py#L2606