From 982bc73f4a4f18ab1a0917e12218d697f9b665a1 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 4 Nov 2015 11:48:30 -0800 Subject: [PATCH] Add logging to snapshot_volume_backed method The cells job is failing on a race where an image is created from an instance with a single volume attached, but we have multiple (duplicate) BDMs for the instance so we end up with multiple volume snapshots for the image, which later fails a boot request using the snapshot image because the image has duplicate BDMs with the same boot_index, which is invalid in the request. This just adds some debug logging when we actually call off to cinder to create a volume snapshot so we have the request context and instance uuid in the logs for tracing. Change-Id: Iba8ad7cf40ba076e90abc8604187700166795c5d Related-Bug: #1489581 --- nova/compute/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nova/compute/api.py b/nova/compute/api.py index 9eda90103371..41019ff15655 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -2347,6 +2347,8 @@ class API(base.Base): # Linux LVM snapshot creation completes in # short time, it doesn't matter for now. name = _('snapshot for %s') % image_meta['name'] + LOG.debug('Creating snapshot from volume %s.', volume['id'], + instance=instance) snapshot = self.volume_api.create_snapshot_force( context, volume['id'], name, volume['display_description']) mapping_dict = block_device.snapshot_from_bdm(snapshot['id'],