Detach volume rescue

Bug #1126187 reported by Nithya Ganesan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Joe Gordon

Bug Description

Detaching a volume from a VM in "RESCUE" state does not bring the volume back to available state.

Steps to reproduce the problem
--------------------------------------------
1. Create a server and wait for it to get to ACTIVE state
2. Create a volume and wait for it to get to AVAILABLE state
3. Attach the volume to the server and wait for the volume to get to "IN USE" state
4. Rescue the VM and wait for the VM to get to the "RESCUE" state
5. Detach the volume from the server and wait for the volume to get to "AVAILABLE" state. This step fails

Please find the test log attached

Revision history for this message
Nithya Ganesan (nithya-ganesan) wrote :
Revision history for this message
Nithya Ganesan (nithya-ganesan) wrote :
Download full text (4.1 KiB)

Please note that the problem exists for the volumes that are attached before moving the VM to the rescue state.

Attach and detach to a VM after moving the VM to rescue state is success ful.

stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova list
+--------------------------------------+------------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+------------------+
| 760c3933-834d-4d9c-aab0-51b82bdfb1c9 | testrescue | RESCUE | private=10.0.0.2 |
+--------------------------------------+------------+--------+------------------+
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova volume-list
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| aaf44487-a639-4407-9bac-26a6bda18df5 | available | None | 1 | None | |
| cc282627-47ca-44bc-a326-c20c787d1fda | in-use | None | 1 | None | 760c3933-834d-4d9c-aab0-51b82bdfb1c9 |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
(reverse-i-search)`det': nova volume-^Ctach 760c3933-834d-4d9c-aab0-51b82bdfb1c9 cc282627-47ca-44bc-a326-c20c787d1fda
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ no^C
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova volume-attach 760c3933-834d-4d9c-aab0-51b82bdfb1c9 aaf44487-a639-4407-9bac-26a6bda18df5 /dev/vdp
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdp |
| serverId | 760c3933-834d-4d9c-aab0-51b82bdfb1c9 |
| id | aaf44487-a639-4407-9bac-26a6bda18df5 |
| volumeId | aaf44487-a639-4407-9bac-26a6bda18df5 |
+----------+--------------------------------------+
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova volume-list
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
| aaf44487-a639-4407-9bac-26a6bda18df5 | in-use | None | 1 | None | 760c3933-834d-4d9c-aab0-51b82bdfb1c9 |
| cc282627-47ca-44bc-a326-c20c787d1fda | in-use | None | 1 | None | 760c3933-834d-4d9c-aab0-51b82bdfb1c9 |
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
stack@server-1359571136-az-1-region-a-geo-1:...

Read more...

Revision history for this message
Vish Ishaya (vishvananda) wrote :

i think we should just disable attach and detach for vms in rescue

Changed in nova:
importance: Undecided → Medium
status: New → Triaged
milestone: none → grizzly-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23885

Changed in nova:
assignee: nobody → Joe Gordon (jogo)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/23885
Committed: http://github.com/openstack/nova/commit/84b73cf3d46200fef6521d79c8aa59ccb7a96224
Submitter: Jenkins
Branch: master

commit 84b73cf3d46200fef6521d79c8aa59ccb7a96224
Author: Joe Gordon <email address hidden>
Date: Fri Mar 8 02:17:22 2013 +0000

    Prevent volume-attach/detach from instances in rescue state

    Rescue is supposed to just be a way to log into a wayward instance
    if something goes wrong with the base image that may have had some data
    (logfiles etc.) and make it possible to grab that - block devices are
    assumed to be accessible by re-attaching them, and are considered
    persistant so no need for rescue there.

    Since there is no need to attach a volume in rescue mode, and detaching a
    volume that was previously attached doesn't work, just ban volume
    attach/detach in rescue state.

    Fixes bug 1126187

    Change-Id: Ifdf164155942cdeb2bbdfcd1dce0dd2e125b507c

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.