diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-09-28 17:09:12 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-09-28 17:09:12 +0000 |
| commit | 64702669c879dbc5cf27712ef8fadb9fd043664d (patch) | |
| tree | fb8a6a17a235090ad942e69b01595a9a3c04d193 /nova | |
| parent | d68151723c106989077be7e3e4db766c28b64362 (diff) | |
| parent | 290659edee6e6f2d0e0d99a3058747b5e02ce7b9 (diff) | |
Merge "xenapi: make it easier to recover from failed migrations"
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 52cb9b17b..3f14b98b9 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -738,6 +738,12 @@ class VMOps(object): step=0, total_steps=RESIZE_TOTAL_STEPS) + # NOTE(sirp): in case we're resizing to the same host (for dev + # purposes), apply a suffix to name-label so the two VM records + # extant until a confirm_resize don't collide. + name_label = self._get_orig_vm_name_label(instance) + vm_utils.set_vm_name_label(self._session, vm_ref, name_label) + if resize_down: self._migrate_disk_resizing_down( context, instance, dest, instance_type, vm_ref, sr_path) @@ -745,12 +751,6 @@ class VMOps(object): self._migrate_disk_resizing_up( context, instance, dest, vm_ref, sr_path) - # NOTE(sirp): in case we're resizing to the same host (for dev - # purposes), apply a suffix to name-label so the two VM records - # extant until a confirm_resize don't collide. - name_label = self._get_orig_vm_name_label(instance) - vm_utils.set_vm_name_label(self._session, vm_ref, name_label) - # NOTE(sirp): disk_info isn't used by the xenapi driver, instead it # uses a staging-area (/images/instance<uuid>) and sequence-numbered # VHDs to figure out how to reconstruct the VDI chain after syncing |
