Skip to content

Commit

Permalink
xenapi: Only coalesce VHDs if needed
Browse files Browse the repository at this point in the history
If the original parent is None, then we don't need to coalesce the VHD since
there won't be a grandparent for the child to coalesce into. Doing otherwise,
causes us to poll forever as we wait for the child's parent to become `None`.

Fixes bug 1200806

Change-Id: I0cbf0be86ff925b83c0b8fa90f88d4ca304fd2b9
  • Loading branch information
rconradharris committed Jul 15, 2013
1 parent a2ab383 commit be019af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nova/virt/xenapi/vm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1847,10 +1847,12 @@ def _wait_for_vhd_coalesce(session, instance, sr_ref, vdi_ref,
* parent_vhd
snapshot
"""
def _another_child_vhd():
if not original_parent_uuid:
return False
# NOTE(sirp): If we don't have an original_parent_uuid, then the snapshot
# doesn't have a grandparent to coalesce into, so we can skip waiting
if not original_parent_uuid:
return

def _another_child_vhd():
# Search for any other vdi which parents to original parent and is not
# in the active vm/instance vdi chain.
vdi_uuid = session.call_xenapi('VDI.get_record', vdi_ref)['uuid']
Expand Down

0 comments on commit be019af

Please sign in to comment.