Nova should allow HARD_REBOOT to instances in the state REBOOTING_HARD

Bug #1290746 reported by Matthew Gilliard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
Saranya Pandian

Bug Description

Currently when trying to issue a hard reboot to an instance, the logic in nova/compute/api.py says:

    if (reboot_type == 'HARD' and instance['task_state'] == task_states.REBOOTING_HARD)):
        raise exception.InstanceInvalidState

This means there's no user-facing way to rescue an instance that is stuck in REBOOTING_HARD except for DELETE.

We should allow hard reboot to happen in the state REBOOTING_HARD. Some new locking code will be required.

Tags: compute
description: updated
Michael Still (mikal)
Changed in nova:
status: New → Triaged
importance: Undecided → Low
tags: added: compute
Changed in nova:
assignee: nobody → Saranya Pandian (saranya-pandian)
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/84642

Changed in nova:
status: Triaged → In Progress
Revision history for this message
Thang Pham (thang-pham) wrote :

Can't you issue a "nova reset-state [--active] <instance>" to bring the instance to a state where you can then issue a hard reboot, instead of deleting this section of code?

Revision history for this message
Jay Pipes (jaypipes) wrote :

Thang, I agree that is a way that an *admin* user could effectively reset the state of the instance.

Unfortunately, there's no way for a normal user to do such a thing, AFAIK.

That said, I don't think Saranya's patch is really the appropriate fix here. I'd rather see a fix that identifies causes for an instance getting stuck in the REBOOTING_HARD state and attempts to rectify the stuck instance (either in a retry with timeout loop, or calling into the hypervisor itself to see what's up with the instance).

Revision history for this message
Saranya Pandian (saranya-pandian) wrote :

My thought is that the virtual instance should appear to the user in the same way as a physical machine. One can reset ('hard reboot') a physical machine multiple times even if a reset is already in progress. Hence the fix.

Well, shouldn't we let hypervisor handle such scenarios for all the booting cases? All hypervisors handle these cases appropriately.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Saranya, physical machines cannot be hard-rebooted while being hard-rebooted. It's physically impossible.

I'm actually not even sure this bug is valid. Or rather, it *might* be a valid bug if the instance is somehow getting stuck in REBOOTING_HARD task_state and is unable to be saved other than an admin manually resetting the state. But that is not actually the description of the bug.

Changed in nova:
status: In Progress → Incomplete
Sean Dague (sdague)
Changed in nova:
status: Incomplete → Invalid
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.