Re: [PATCH for 5.7.0 2/3] qemu_blockjob: Print image path on failed security metadata move too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 30, 2019 at 15:19:07 +0200, Michal Privoznik wrote:
> 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@xxxxxxxxxx>
> ---
>  src/qemu/qemu_blockjob.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

ACK

> 
> diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
> index c77a129bfc..80302fb139 100644
> --- a/src/qemu/qemu_blockjob.c
> +++ b/src/qemu/qemu_blockjob.c
> @@ -646,8 +646,10 @@ 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",
> +                     vm->def->name, NULLSTR(disk->src->path), NULLSTR(disk->mirror->path));

perhaps also log disk->dst

> +        }
>  
>          virObjectUnref(disk->src);
>          disk->src = disk->mirror;
> -- 
> 2.21.0
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux