Comment 1 for bug 2008876

Revision history for this message
zhouzhong (zhouzhong) wrote (last edit ):

I have made restrictions on all operations that may be affected by the status of the source node. The specific implementation is add the decorator "@check_instance_host(check_is_up=True)".

Uploaded patch at https://review.opendev.org/c/openstack/nova/+/875859

Instance unexpected shutdown when source node startup

Before shutdown the instance, the source node was breakdown, caused that
the shutdown instance message remained in queue and could not be
consumed, message was not consumed until the source node was started.
When the source node was up, continuing to execute the stop operation,
and the instance vm_state was changed to STOPPED, the periodic task of
synchronized power state _sync_power_states was captured and triggered
the shutdown operation.

Not only the instance shutdown operation, but also the operations
related to the status of the source node where the instance is located
is abnormal, the operation on the instance may cause unexpected
exceptions, so they are limited.