]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu_blockjob: Print image path on failed security metadata move too
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 30 Aug 2019 13:07:48 +0000 (15:07 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 31 Aug 2019 08:11:37 +0000 (10:11 +0200)
When a block job is completed, the security image metadata are
moved to the new image. If this fails an warning is printed, but
the message contains only domain name and lacks image paths. Put
them both into the warning message.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
ACKed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_blockjob.c

index c77a129bfce072581fead0a70b5ec257aad4b3c2..1b22689e0c22d0d756b193f419ec4252d9753c5e 100644 (file)
@@ -646,8 +646,14 @@ qemuBlockJobEventProcessLegacyCompleted(virQEMUDriverPtr driver,
         virDomainLockImageDetach(driver->lockManager, vm, disk->src);
 
         /* Move secret driver metadata */
-        if (qemuSecurityMoveImageMetadata(driver, vm, disk->src, disk->mirror) < 0)
-            VIR_WARN("Unable to move disk metadata on vm %s", vm->def->name);
+        if (qemuSecurityMoveImageMetadata(driver, vm, disk->src, disk->mirror) < 0) {
+            VIR_WARN("Unable to move disk metadata on "
+                     "vm %s from %s to %s (disk target %s)",
+                     vm->def->name,
+                     NULLSTR(disk->src->path),
+                     NULLSTR(disk->mirror->path),
+                     disk->dst);
+        }
 
         virObjectUnref(disk->src);
         disk->src = disk->mirror;