libvirt: don't log snapshot success unless it actually happens
Because of where this message was in the finally block, it would log that we successfully extracted a snapshot even if we failed, like if _live_snapshot fails because the guest is deleted concurrently during the snapshot process. This moves the info log message into the block of code where we actually know that we successfully extracted the snapshot. Change-Id: Ie12592c2daecbe764fa52dde6b0dafdbcafe102e
This commit is contained in:
parent
c531b7905f
commit
50915b013f
@ -1752,11 +1752,11 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||||||
image_format, instance.image_meta)
|
image_format, instance.image_meta)
|
||||||
else:
|
else:
|
||||||
root_disk.snapshot_extract(out_path, image_format)
|
root_disk.snapshot_extract(out_path, image_format)
|
||||||
|
LOG.info("Snapshot extracted, beginning image upload",
|
||||||
|
instance=instance)
|
||||||
finally:
|
finally:
|
||||||
self._snapshot_domain(context, live_snapshot, virt_dom,
|
self._snapshot_domain(context, live_snapshot, virt_dom,
|
||||||
state, instance)
|
state, instance)
|
||||||
LOG.info("Snapshot extracted, beginning image upload",
|
|
||||||
instance=instance)
|
|
||||||
|
|
||||||
# Upload that image to the image service
|
# Upload that image to the image service
|
||||||
update_task_state(task_state=task_states.IMAGE_UPLOADING,
|
update_task_state(task_state=task_states.IMAGE_UPLOADING,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user