Reboot should not change state to active until after the reboot completes

Bug #1188343 reported by Phil Day
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Phil Day

Bug Description

reboot_instance() in the compute manager currently changes the vm_state to active before it does anything else.

If an instance was stopped (for example) and the reboot fails the vm_state is left as active

It should leave the vm_state alone until the reboot has successfully completed, and then change to Active if it is not Rescued.

It should also set vm_state to error if the reboot fails.

See also this bug as to why going to Error is acceptable:
https://bugs.launchpad.net/nova/+bug/1183946

Phil Day (philip-day)
Changed in nova:
assignee: nobody → Phil Day (philip-day)
status: New → In Progress
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/32214

Yun Mao (yunmao)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/32214
Committed: http://github.com/openstack/nova/commit/bd9269278a532468e81bc752f89f05d74d9ee8e5
Submitter: Jenkins
Branch: master

commit bd9269278a532468e81bc752f89f05d74d9ee8e5
Author: Phil Day <email address hidden>
Date: Sat Jun 8 00:30:18 2013 +0100

    Fix bad vm_state change in reboot_instance()

    Currently reboot_instance() in the compute manager
    changes the vm_state to active before it does anything
    else. This means that if there is an error in the reboot
    operation then the vm_state is left as active although
    the instance may not be running.

    This change leaves the vm_state alone until the reboot
    has completed

    If the reboot fails but the power_state shows that it
    is running then we log the fault but leave it in an
    active or rescued state

    If the reboot fails and the power_state shows that it
    is not running then we set vm_state to error

    See also https://bugs.launchpad.net/nova/+bug/1183946
    which make recovery from an Error state possible.

    Fixes bug: 1188343

    Change-Id: Idabd358d3bcaf63e21ff59188f805143dbaf9ada

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-2 → 2013.2
Revision history for this message
Swami Reddy (swamireddy) wrote :

Could not see the patch at https://review.openstack.org/c/131374/ . How can I see this patch?

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.