The last fix was reverted https://review.openstack.org/#/c/335652/

** Changed in: nova
       Status: Fix Released => Confirmed

-- 
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/1404867

Title:
  Volume remains in-use status, if instance booted from volume is
  deleted in error state

Status in OpenStack Compute (nova):
  Confirmed

Bug description:
  If the instance is booted from volume and goes in to error state due to some 
reason.
  Volume from which instance is booted, remains in-use state even the instance 
is deleted.
  IMO, volume should be detached so that it can be used to boot other instance.

  Steps to reproduce:

  1. Log in to Horizon, create a new volume.
  2. Create an Instance using newly created volume.
  3. Verify instance is in active state.
  $ source devstack/openrc demo demo
  $ nova list
  
+--------------------------------------+------+--------+------------+-------------+------------------+
  | ID                                   | Name | Status | Task State | Power 
State | Networks         |
  
+--------------------------------------+------+--------+------------+-------------+------------------+
  | dae3a13b-6aa8-4794-93cd-5ab7bf90f604 | nova | ACTIVE | -          | Running 
    | private=10.0.0.3 |
  
+--------------------------------------+------+--------+------------+-------------+------------------+

  Note:
  Use shelve-unshelve api to see the instance goes into error state.
  unshelving volumed back instance does not work and sets instance state to 
error state (ref: https://bugs.launchpad.net/nova/+bug/1404801)

  4. Shelve the instance
  $ nova shelve <instance-uuid>

  5. Verify the status is SHELVED_OFFLOADED.
  $ nova list
  
+--------------------------------------+------+-------------------+------------+-------------+------------------+
  | ID                                   | Name | Status            | Task 
State | Power State | Networks         |
  
+--------------------------------------+------+-------------------+------------+-------------+------------------+
  | dae3a13b-6aa8-4794-93cd-5ab7bf90f604 | nova | SHELVED_OFFLOADED | -         
 | Shutdown    | private=10.0.0.3 |
  
+--------------------------------------+------+-------------------+------------+-------------+------------------+

  6. Unshelve the instance.
  $ nova unshelve <instance-uuid>

  5. Verify the instance is in Error state.
  $ nova list
  
+--------------------------------------+------+-------------------+------------+-------------+------------------+
  | ID                                   | Name | Status            | Task 
State | Power State | Networks         |
  
+--------------------------------------+------+-------------------+------------+-------------+------------------+
  | dae3a13b-6aa8-4794-93cd-5ab7bf90f604 | nova | Error             | 
unshelving | Spawning    | private=10.0.0.3 |
  
+--------------------------------------+------+-------------------+------------+-------------+------------------+

  6. Delete the instance using Horizon.

  7. Verify that volume still in in-use state
  $ cinder list
  
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
  |                  ID                  | Status | Name | Size | Volume Type | 
Bootable |             Attached to              |
  
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
  | 4aeefd25-10aa-42c2-9a2d-1c89a95b4d4f | in-use | test |  1   | lvmdriver-1 | 
  true   | 8f7bdc24-1891-4bbb-8f0c-732b9cbecae7 |
  
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+

  8. In Horizon, volume "Attached To" information is displayed as
  "Attached to None on /dev/vda".

  9. User is not able to delete this volume, or attached it to another
  instance as it is still in use.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to