← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1913016] [NEW] nova api os-resetState should not reset the state when VM is shelved_offloaded

 

Public bug reported:

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-02c3-4c11-bd61-bfd9b9b8ad21 | test2 | SHELVED_OFFLOADED | -          | Shutdown    | sriov-net1-197=10.74.167.185 |
+--------------------------------------+-------+-------------------+------------+-------------+------------------------------+
(overcloud) [stack@undercloud ~]$ openstack server set --state active test2
(overcloud) [stack@undercloud ~]$ openstack server list 
+--------------------------------------+-------+--------+------------------------------+---------+-----------+
| ID                                   | Name  | Status | Networks                     | Image   | Flavor    |
+--------------------------------------+-------+--------+------------------------------+---------+-----------+
| f86f9503-02c3-4c11-bd61-bfd9b9b8ad21 | test2 | ACTIVE | sriov-net1-197=10.74.167.185 | rhel7.7 | m1-medium |
+--------------------------------------+-------+--------+------------------------------+---------+-----------+
(overcloud) [stack@undercloud ~]$ openstack server unshelve test2
Cannot 'unshelve' instance f86f9503-02c3-4c11-bd61-bfd9b9b8ad21 while it is in vm_state active (HTTP 409) (Request-ID: req-c992c5f5-63c9-4472-be75-9594bc682b37)
~~~

Not just unshelve, we cannot perform any VM operation as VM doesn't
exist anywhere.

** Affects: nova
     Importance: Undecided
     Assignee: Khomesh Thakre (khomesh24)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Khomesh Thakre (khomesh24)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1913016

Title:
  nova api os-resetState should not reset the state when VM is
  shelved_offloaded

Status in OpenStack Compute (nova):
  New

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-02c3-4c11-bd61-bfd9b9b8ad21 | test2 | SHELVED_OFFLOADED | -          | Shutdown    | sriov-net1-197=10.74.167.185 |
  +--------------------------------------+-------+-------------------+------------+-------------+------------------------------+
  (overcloud) [stack@undercloud ~]$ openstack server set --state active test2
  (overcloud) [stack@undercloud ~]$ openstack server list 
  +--------------------------------------+-------+--------+------------------------------+---------+-----------+
  | ID                                   | Name  | Status | Networks                     | Image   | Flavor    |
  +--------------------------------------+-------+--------+------------------------------+---------+-----------+
  | f86f9503-02c3-4c11-bd61-bfd9b9b8ad21 | test2 | ACTIVE | sriov-net1-197=10.74.167.185 | rhel7.7 | m1-medium |
  +--------------------------------------+-------+--------+------------------------------+---------+-----------+
  (overcloud) [stack@undercloud ~]$ openstack server unshelve test2
  Cannot 'unshelve' instance f86f9503-02c3-4c11-bd61-bfd9b9b8ad21 while it is in vm_state active (HTTP 409) (Request-ID: req-c992c5f5-63c9-4472-be75-9594bc682b37)
  ~~~

  Not just unshelve, we cannot perform any VM operation as VM doesn't
  exist anywhere.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1913016/+subscriptions


Follow ups