xenapi: remove all resources when VM fails to spawn

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

Bug Description

If a VM fails to spawn, resources such as VDIs, are not removed from the target hypervisor.
This happens when the failure occurs before the VM record is created in xenapi.
vm_ops.destroy is therefore not able to locate all the resources used by the instance of there is no record for that instance in xenapi.

Note: this is different from bug #694935. That bug fix dealt with VM that failed to boot.

Related branches

Changed in nova:
assignee: nobody → Salvatore Orlando (salvatore-orlando)
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

The attached patch keeps track of the resources created on the Xen backend until the VM record is created.

If a failure occurs, the exception handler will destroy all the VDIs created so far, as well as kernel/ramdisk files stored on dom0's filesystem.

Revision history for this message
Thierry Carrez (ttx) wrote :

@Salvatore: still working on that ? Or should we unassign you to give someone else a chance to fix it ?

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Branch has been updated to reflect latest changes in xenapi backend.
However, code quality can be improved.
Before proposing for merge, I would like to see if anybody has an opinion on this question: https://answers.launchpad.net/nova/+question/161496

Thanks,
Salvatore

Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-3
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-3 → 2011.3
status: Fix Committed → Fix Released
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.