vmware: Rebooting a powered off instance puts instance in error state

Bug #1250680 reported by Sreeram Yerrapragada
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Wishlist
Shawn Hartsock
VMwareAPI-Team
Won't Fix
Wishlist
Shawn Hartsock

Bug Description

Steps to reproduce:
1. Launch an instance
2. Shutdown instance
3. Reboot instance

Traceback: http://paste.openstack.org/show/52226/

Change in compute API here:
  https://github.com/openstack/nova/blob/e9627002bd3df5c24fac5f0302ab683b31b4ddd6/nova/compute/api.py#L1955

makes the action of rebooting an instance that is shutdown an invalid action. So this whole bug isn't something that can be "fixed" at the driver level.

Revision history for this message
Yaguang Tang (heut2008) wrote :

this is expected more than a bug. currently, only powered on instance can be rebooted .

Changed in nova:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Shawn Hartsock (hartsock)
milestone: none → icehouse-1
Revision history for this message
Shawn Hartsock (hartsock) wrote :

To me, it looks like there is a difference in definition for the term "reboot" between vSphere and Nova.

In vCenter you cannot "reboot" a computer that is not turned on. The logic here would be... when you "turn on" a computer you are "booting" it. When you "reboot" a computer, it is currently on and you are sending it through power-off then power-on states again.

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

Changed in nova:
status: Confirmed → In Progress
Changed in openstack-vmwareapi-team:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Shawn Hartsock (hartsock)
Tracy Jones (tjones-i)
tags: added: havana-backport-potential
Changed in nova:
milestone: icehouse-1 → icehouse-2
Revision history for this message
Shawn Hartsock (hartsock) wrote :

This is not a valid use case.
https://github.com/openstack/nova/blob/e9627002bd3df5c24fac5f0302ab683b31b4ddd6/nova/compute/api.py#L1955

Makes the action of rebooting a VM that is powered off an illegal action.

description: updated
Changed in nova:
importance: High → Wishlist
Changed in openstack-vmwareapi-team:
importance: High → Wishlist
Changed in nova:
status: In Progress → Won't Fix
Changed in openstack-vmwareapi-team:
status: In Progress → Won't Fix
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-2 → none
Revision history for this message
Kiran Kumar Vaddi (kiran-kumar-vaddi) wrote :

Hi Shawn,
the check
@check_instance_state(vm_state=[vm_states.ACTIVE, vm_states.STOPPED,
for
def reboot(...)

actually makes STOPPED state a valid state

similar to how the VM ins stopped state is valid for def start
@check_instance_state(vm_state=[vm_states.STOPPED])
def start(self, context, instance):

Since reboot on Stopped VM is putting the instance into error, we should remove vm_states.STOPPED from the check_instance_state check for reboot making "action of rebooting a VM that is powered off an illegal action"

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.