Comment 2 for bug 1832720

Revision history for this message
Surya Seetharaman (tssurya) wrote :

Ignore the previous comment, the cache refreshal happens during every periodic task like stated in the code comment through "get_available_nodes" function (https://github.com/openstack/nova/blob/a628d2f09a42a0faa5fcb36793e2304de634638e/nova/compute/manager.py#L8123), the reason for inconsistency is because at the time of saving the power state during nova start/stop, the power_state is taken from the cache at the time when the cache is not upto date and then saves it to the database. So even if the cache gets refreshed, the database has already saved the wrong information which is why it waits for 10mins (the next power sync) to change this information. So we should grab the latest info during the start/stop actions.