Rebooting a VM in Rescue state takes the VM to Active state

Bug #1126163 reported by Nithya Ganesan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Russell Bryant

Bug Description

Rebooting a VM in rescue state should not be allowed, as it gets the VM back to the active state (and VM could be unusable still). Reboot on rescued VM should be blocked the way it is done for other server operations like Snapshot on rescued VM / rebuild on a rescued VM

stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova image-list
+--------------------------------------+---------------------------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| dba8c589-4864-4cb0-8531-1f95c66c815b | cirros-0.3.0-x86_64-uec | ACTIVE | |
| 4806d1a4-aabd-43e8-a201-b82935cd896a | cirros-0.3.0-x86_64-uec-kernel | ACTIVE | |
| 9b7c5642-b295-4f83-abdb-ef2be6c2b0d7 | cirros-0.3.0-x86_64-uec-ramdisk | ACTIVE | |
+--------------------------------------+---------------------------------+--------+--------+
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova boot --image=dba8c589-4864-4cb0-8531-1f95c66c815b --flavor=1 testrescue
+------------------------+--------------------------------------+
| Property | Value |
+------------------------+--------------------------------------+
| status | BUILD |
| updated | 2013-02-15T12:12:09Z |
| OS-EXT-STS:task_state | scheduling |
| key_name | None |
| image | cirros-0.3.0-x86_64-uec |
| hostId | |
| OS-EXT-STS:vm_state | building |
| flavor | m1.tiny |
| id | 760c3933-834d-4d9c-aab0-51b82bdfb1c9 |
| security_groups | [{u'name': u'default'}] |
| user_id | af7d5d9476e74baa872fe3a469f2ddc1 |
| name | testrescue |
| adminPass | gs9T2ZUMc4ZG |
| tenant_id | 70da7d12007e42e684926fec7a18635c |
| created | 2013-02-15T12:12:09Z |
| OS-DCF:diskConfig | MANUAL |
| accessIPv4 | |
| accessIPv6 | |
| progress | 0 |
| OS-EXT-STS:power_state | 0 |
| metadata | {} |
| config_drive | |
+------------------------+--------------------------------------+
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova list
+--------------------------------------+------------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+------------------+
| 760c3933-834d-4d9c-aab0-51b82bdfb1c9 | testrescue | ACTIVE | private=10.0.0.2 |
+--------------------------------------+------------+--------+------------------+
(reverse-i-search)`act': source .venv/bin/^Ctivate
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova rescue 760c3933-834d-4d9c-aab0-51b82bdfb1c9
+-----------+--------------+
| Property | Value |
+-----------+--------------+
| adminPass | CdeNx7UTeb9A |
+-----------+--------------+
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 reboot 760c3933-834d-4d9c-aab0-51b82bdfb1c9
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova list
+--------------------------------------+------------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+------------------+
| 760c3933-834d-4d9c-aab0-51b82bdfb1c9 | testrescue | REBOOT | private=10.0.0.2 |
+--------------------------------------+------------+--------+------------------+
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova list
+--------------------------------------+------------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+------------------+
| 760c3933-834d-4d9c-aab0-51b82bdfb1c9 | testrescue | REBOOT | private=10.0.0.2 |
+--------------------------------------+------------+--------+------------------+
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova list
+--------------------------------------+------------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+------------------+
| 760c3933-834d-4d9c-aab0-51b82bdfb1c9 | testrescue | REBOOT | private=10.0.0.2 |
+--------------------------------------+------------+--------+------------------+
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$ nova list
+--------------------------------------+------------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+------------------+
| 760c3933-834d-4d9c-aab0-51b82bdfb1c9 | testrescue | REBOOT | private=10.0.0.2 |
+--------------------------------------+------------+--------+------------------+
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$
+--------------------------------------+------------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+------------------+
| 760c3933-834d-4d9c-aab0-51b82bdfb1c9 | testrescue | ACTIVE | private=10.0.0.2 |
+--------------------------------------+------------+--------+------------------+
stack@server-1359571136-az-1-region-a-geo-1:~/latest_tempest/tempest$

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

agreed we should disable this.

Changed in nova:
status: New → Triaged
importance: Undecided → Medium
milestone: none → grizzly-rc1
Changed in nova:
assignee: nobody → Russell Bryant (russellb)
Revision history for this message
Adam Jacob Muller (78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1ohg85w3jabxlrqbgszpjpwcmvk-launchpad) wrote :

I would humbly suggest to increase the priority of this, an instance in a rescued state that then goes ACTIVE is extremely difficult to fix (impossible without access to the hypervisor, afaict).

the libvirt XML configuration will never be updated to remove the .rescue files, and so the libvirt configuration needs to be edited to manually fix the disk configuration.

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

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

Reviewed: https://review.openstack.org/23482
Committed: http://github.com/openstack/nova/commit/68a5519e2ed52e1d55f304d198b2967c084610d8
Submitter: Jenkins
Branch: master

commit 68a5519e2ed52e1d55f304d198b2967c084610d8
Author: Russell Bryant <email address hidden>
Date: Mon Mar 4 18:00:42 2013 -0500

    Prevent reboot of rescued instance.

    Do not allow rebooting an instance in the RESCUED state. This will
    revert the instance back into an ACTIVE state, which may still be
    broken. Require an explicit unrescue, instead.

    Fix bug 1126163.

    Change-Id: I144163666767923e3beb0a82e687066d1f3a0441

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.