public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] fix #5572: avoid warning about uninitialized value when cloning cloudinit disk
@ 2024-07-03  8:40 Fiona Ebner
  2024-07-03 12:33 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2024-07-03  8:40 UTC (permalink / raw)
  To: pve-devel

Some callers like the move disk API endpoint do not pass an explicit
completion argument. This is not an issue in general, because
qemu_drive_mirror_monitor() defaults to 'complete'. However, there was
a string comparision for the cloudinit case that can trigger a warning
about the value being uninitialized.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 9fac4a47..cf348cac 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -8280,7 +8280,7 @@ sub clone_disk {
 	    # when cloning multiple disks (e.g. during clone_vm) it might be the last disk
 	    # if this is the case, we have to complete any block-jobs still there from
 	    # previous drive-mirrors
-	    if (($completion eq 'complete') && (scalar(keys %$jobs) > 0)) {
+	    if (($completion && $completion eq 'complete') && (scalar(keys %$jobs) > 0)) {
 		qemu_drive_mirror_monitor($vmid, $newvmid, $jobs, $completion, $qga);
 	    }
 	    goto no_data_clone;
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] fix #5572: avoid warning about uninitialized value when cloning cloudinit disk
  2024-07-03  8:40 [pve-devel] [PATCH qemu-server] fix #5572: avoid warning about uninitialized value when cloning cloudinit disk Fiona Ebner
@ 2024-07-03 12:33 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-07-03 12:33 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

Am 03/07/2024 um 10:40 schrieb Fiona Ebner:
> Some callers like the move disk API endpoint do not pass an explicit
> completion argument. This is not an issue in general, because
> qemu_drive_mirror_monitor() defaults to 'complete'. However, there was
> a string comparision for the cloudinit case that can trigger a warning
> about the value being uninitialized.
> 
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>  PVE/QemuServer.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-03 12:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-03  8:40 [pve-devel] [PATCH qemu-server] fix #5572: avoid warning about uninitialized value when cloning cloudinit disk Fiona Ebner
2024-07-03 12:33 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal