Pausing a rescued instance should be impossible

Bug #1319182 reported by Cyril Roelandt
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Leandro Ignacio Costantino
Icehouse
Fix Released
Undecided
Leandro Ignacio Costantino

Bug Description

In the following commands, 'vmtest' is a freshly created virtual machine.

$ nova show vmtest | grep -E "(status|task_state)"
| OS-EXT-STS:task_state | -
| status | ACTIVE

$ nova rescue vmtest
+-----------+--------------+
| Property | Value
+-----------+--------------+
| adminPass | 2ZxvzZULT4sr
+-----------+--------------+

$ nova show vmtest | grep -E "(status|task_state)"
| OS-EXT-STS:task_state | -
| status | RESCUE

$ nova pause vmtest

$ nova show vmtest | grep -E "(status|task_state)"
| OS-EXT-STS:task_state | -
| status | PAUSED

$ nova unpause vmtest

$ nova show vmtest | grep -E "(status|task_state)"
| OS-EXT-STS:task_state | -
| status | ACTIVE

Here, we would want the vm to be in the 'RESCUE' state, as it was before being paused.

$ nova unrescue vmtest
ERROR (Conflict): Cannot 'unrescue' while instance is in vm_state active (HTTP 409) (Request-ID: req-34b8004d-b072-4328-bbf9-29152bd4c34f)

The 'unrescue' command fails, which seems to confirm that the VM was no longer being rescued.

So, two possibilities:
1) When unpausing, the vm should go back to 'rescued' state
2) Rescued vms should not be allowed to be paused, as is indicated by this graph: http://docs.openstack.org/developer/nova/devref/vmstates.html

Note that the same issue can be observed with suspend/resume instead of pause/unpause, and probably other commands as well.

WDYT ?

Tracy Jones (tjones-i)
tags: added: compute
Changed in nova:
assignee: nobody → Leandro Ignacio Costantino (leandro-i-costantino)
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/94281

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

Reviewed: https://review.openstack.org/94281
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8ff170dc95bf3101fe38a2624e941bfa3b7c1138
Submitter: Jenkins
Branch: master

commit 8ff170dc95bf3101fe38a2624e941bfa3b7c1138
Author: Leandro I. Costantino <email address hidden>
Date: Mon May 19 19:58:47 2014 -0300

    VM in rescue state must have a restricted set of actions

    Right now it is possible to pause, suspend and stop a VM in state RESCUED,
    so after the state is changed, it's not possible to trigger unrescue anymore
    since the original state is lost.

    This patch remove vm_states.RESCUED as valid state from stop,
    pause and suspend actions.

    The vm_states devref is also updated to reflect this change including the
    current reboot flow.( vm_states.RESCUED cannot be rebooted as per
    today code)

    DocImpact
    Closes-Bug: #1319182
    Co-Authored-By: Cyril Roelandt <email address hidden>
    Change-Id: I531dea5a5499bf93c24bea37850d562134dee281

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/109624

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/icehouse)

Reviewed: https://review.openstack.org/109624
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=82a13b30b8153ee4a282604fcfffd1a015365487
Submitter: Jenkins
Branch: stable/icehouse

commit 82a13b30b8153ee4a282604fcfffd1a015365487
Author: Leandro I. Costantino <email address hidden>
Date: Mon May 19 19:58:47 2014 -0300

    VM in rescue state must have a restricted set of actions

    Right now it is possible to pause, suspend and stop a VM in state RESCUED,
    so after the state is changed, it's not possible to trigger unrescue anymore
    since the original state is lost.

    This patch remove vm_states.RESCUED as valid state from stop,
    pause and suspend actions.

    The vm_states devref is also updated to reflect this change including the
    current reboot flow.( vm_states.RESCUED cannot be rebooted as per
    today code)

    This is a backport of 8ff170dc95bf3101fe38a2624e941bfa3b7c1138 .

    DocImpact
    Closes-Bug: #1319182
    Co-Authored-By: Cyril Roelandt <email address hidden>
    Change-Id: I531dea5a5499bf93c24bea37850d562134dee281

tags: added: in-stable-icehouse
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.2
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.