Comment 2 for bug 1913016

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

os-resetState is not designed to be smart[1]. It simply writes the requested state to the DB but it does not do any validation or trigger any change of the VM itself. It is a last resort tool for the admin to
* push an VM from a stuck state to ERROR and the trigger a rebuild to recover it
* fix a db inconsistency where the VM is clearly and happily running but the DB state does not reflect that.

There are many cases when pushing a VM state to ACTIVE while it is not really running causes inconsistencies.

I don't think we want to make os-resetState smarter. But a fat warning should be added to the API reference.

[1] https://github.com/openstack/nova/blob/87d05fbae28d3dd29de8a7c98cf26e3f06648879/nova/api/openstack/compute/admin_actions.py#L63-L79