Resize STOPPED instance on same host is in ACTIVE state after resize

Bug #1177811 reported by Matt Riedemann on 2013-05-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Matt Riedemann

Bug Description

Testing on stable/grizzly, if you have an instance in STOPPED state and then resize it to the same host, the resized instance is in ACTIVE state even though it's still powered off in the hypervisor.

The resize/migrate operations allow starting from STOPPED or ACTIVE state:

However, when the resize is confirmed, it updates the instance to ACTIVE state (even though it was originally in STOPPED state):

Eventually the power states are synched between the database and the hypervisor and the instance is set back to STOPPED state:

But the code should be keeping track of the original state of the instance before the resize and make sure it's in that state once the operation is verified.

Tiago Mello (timello) on 2013-05-08
Changed in nova:
assignee: nobody → Tiago Rodrigues de Mello (timello)
Dan Smith (danms) on 2013-05-08
Changed in nova:
importance: Undecided → Medium
status: New → Triaged
Tiago Mello (timello) on 2013-05-10
Changed in nova:
assignee: Tiago Rodrigues de Mello (timello) → nobody

I am out of the office until 05/13/2013.

I am out of the office and will respond to your message as soon as I

For PowerVC scheduler questions, please contact Andrew L Hanson/Rochester.

Note: This is an automated response to your message "[Bug 1177811] Re:
Resize STOPPED instance on same host is in ACTIVE state after resize"
sent on 05/10/2013 9:40:02 AM.

This is the only notification you will receive while this person is away.

Matt Riedemann (mriedem) on 2013-05-10
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
Matt Riedemann (mriedem) on 2013-05-13
Changed in nova:
status: Triaged → In Progress

Fix proposed to branch: master

Submitter: Jenkins
Branch: master

commit 1690a1ae8f2fdddebfb8ae50a8492aedf466b8e3
Author: Matt Riedemann <email address hidden>
Date: Wed May 29 21:12:04 2013 -0700

    Add power_on flag to virt driver finish/revert migration methods

    This patch adds a boolean power_on flag to the virt driver
    finish_migration and finish_revert_migration methods to indicate whether
    or not to power on the instance as part of the resize/migrate operation.
    The default is to power on the instance.

    Related to bug 1177811

    Change-Id: I76c7d6912eda2c333554855a8956bd0fbb1e8b6d

Changed in nova:
status: In Progress → Fix Committed

Submitter: Jenkins
Branch: master

commit 32372a62a89614d4ddc7f2bdc96f41c4d49bd131
Author: Matt Riedemann <email address hidden>
Date: Mon May 13 10:06:11 2013 -0700

    Set resized instance back to original vm_state

    You can resize an instance when it's in the ACTIVE or STOPPED state but
    the code currently always finishes the resize (either confirmed or
    rejected) by putting the instance into ACTIVE state. This change
    saves the original vm_state and uses it to restore the state on the
    instance after the resize is confirmed or rejected.

    With this change, the resize flow will never automatically power on an
    instance that is originally shutoff. The user, however, can manually
    power on the resized instance to test it before confirming or rejecting
    the resize. If the user powered on the instance and confirmed the
    resize, then this change will leave the instance active. If the user
    powered on the instance and then rejected the resize, this change will
    stop the instance when it finishes the revert operation.

    Related to bug 1177811

    Change-Id: I19fa61d467edd5a7572040d084824972569ef65a

Thierry Carrez (ttx) on 2013-07-17
Changed in nova:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in nova:
milestone: havana-2 → 2013.2
Alan Pevec (apevec) on 2014-03-30
tags: removed: grizzly-backport-potential
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers