nova api os-resetState should not reset the state when VM is shelved_offloaded
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Medium
|
Khomesh Thakre |
Bug Description
when the VM is in SHELVED_OFFLOADED state the VM doesn't exist physically on any compute node so resetting the state to active or error might cause the DB inconsistency and also make unshelving difficult.
~~~
(overcloud) [stack@undercloud ~]$ nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| f86f9503-
+------
(overcloud) [stack@undercloud ~]$ openstack server set --state active test2
(overcloud) [stack@undercloud ~]$ openstack server list
+------
| ID | Name | Status | Networks | Image | Flavor |
+------
| f86f9503-
+------
(overcloud) [stack@undercloud ~]$ openstack server unshelve test2
Cannot 'unshelve' instance f86f9503-
~~~
Not just unshelve, we cannot perform any VM operation as VM doesn't exist anywhere.
Changed in nova: | |
assignee: | nobody → Khomesh Thakre (khomesh24) |
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
If we set a VM(with shelved_offload) the state to active it, block by doing any action on VM as it doesn't exist physically anywhere. And the only way to recover is to manually update the DB and set the state back to shelved_offload.