yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #71322
[Bug 1404867] Re: Volume remains in-use status, if instance booted from volume is deleted in error state
** Also affects: nova/ocata
Importance: Undecided
Status: New
** Changed in: nova/ocata
Assignee: (unassigned) => Mohammed Naser (mnaser)
** Changed in: nova/ocata
Status: New => In Progress
** Changed in: nova/ocata
Importance: Undecided => Medium
--
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):
Fix Released
Status in OpenStack Compute (nova) ocata series:
In Progress
Status in OpenStack Compute (nova) pike series:
In Progress
Status in OpenStack Compute (nova) queens series:
In Progress
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
References