deleting instance in rescue state leaves rescue instance on hypervisor

Bug #842653 reported by Dan Prince on 2011-09-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
adapaka bhavaniprasad

Bug Description

Using nova trunk bzr 1526 on XenServer.

If I delete an instance that is in the 'rescue' state the rescue instance is left in a running state on the hypervisor.

As an example: After deleting an instance in rescue state with an ID of '6' here is what I see on the hypervisor:

[root@xen1 ~]# xe vm-list
uuid ( RO) : f7a2a148-8fbd-d30c-0fab-b97f8648f6f7
     name-label ( RW): instance-00000006-rescue
    power-state ( RO): running

Related branches

Dan Prince (dan-prince) on 2011-09-06
Changed in nova:
importance: Undecided → Medium
assignee: nobody → Dan Prince (dan-prince)
status: New → In Progress
Mark McLoughlin (markmc) wrote :

This looks pretty stale, so I'm de-assigning. Obviously, feel free to pick it up again Dan

Changed in nova:
assignee: Dan Prince (dan-prince) → nobody
status: In Progress → Confirmed
description: updated
Changed in nova:
assignee: nobody → adapaka bhavaniprasad (adapaka-prasad)

in order to solve this bug go to below file location

and modify the code as below

  77 def _is_able_to_shutdown(instance, instance_id):
  78 vm_state = instance["vm_state"]
  79 task_state = instance["task_state"]
  81 valid_shutdown_states = [
  82 vm_states.ACTIVE,
  83 vm_states.REBUILDING,
  84 vm_states.BUILDING,
              vm_states.RESCUED, # add this line to in this method
  85 ]
  87 if vm_state not in valid_shutdown_states:
  88 LOG.warn(_("Instance %(instance_id)s is not in an 'active' state. It "
  89 "is currently %(vm_state)s. Shutdown aborted.") % locals())
  90 return False
  92 return True

Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx) on 2012-03-20
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers