xenapi doesn't fully clean up on build failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Chris Behrens |
Bug Description
The build process in xenapi has an Undo manager. As steps are executed, methods to undo are registered. If there's a failure at any point, Undo methods are called for the *previous* calls. This means that if there's a failure in a step, that step also needs to make sure to clean itself up if needed.
The create_vm_step() calls _create_vm()... does a number of things. It creates the VM record, attaches disks, etc. Unfortunately, if there's a failure when attaching disks, it does not remove the VM record. (I didn't check, but I'm not sure if it cleans up any disks that succeeded in attaching, also.)
We need to make _create_vm() clean up the VM record if any disks fail to attach... including detaching disks that succeeded, etc. The undo manager does not work for this, because it assumes the whole step failed such that there's nothing to clean up. (Other possible solution is to perhaps breakup the create_vm_step() into multiple steps)
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in nova: | |
assignee: | nobody → Chris Behrens (cbehrens) |
Changed in nova: | |
milestone: | none → grizzly-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-1 → 2013.1 |
Fix proposed to branch: master /review. openstack. org/15054
Review: https:/