xenapi: remove all resources when VM fails to spawn
Bug #723301 reported by
Salvatore Orlando
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
lp:~salvatore-orlando/nova/bug723301
- Brian Waldon (community): Approve
- Soren Hansen (community): Abstain
- Brian Lamar (community): Approve
- Sandy Walsh (community): Approve
- termie (community): Needs Fixing
- Matt Dietz (community): Approve
- Rick Harris (community): Approve
-
Diff: 621 lines (+320/-95)5 files modifiednova/tests/test_xenapi.py (+42/-0)
nova/tests/xenapi/stubs.py (+39/-0)
nova/virt/xenapi/vm_utils.py (+116/-49)
nova/virt/xenapi/vmops.py (+121/-44)
plugins/xenserver/xenapi/etc/xapi.d/plugins/glance (+2/-2)
Changed in nova: | |
assignee: | nobody → Salvatore Orlando (salvatore-orlando) |
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → diablo-3 |
Changed in nova: | |
milestone: | diablo-3 → 2011.3 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.