* [pve-devel] [PATCH qemu-server] api: create disks: only log cleanup if it's actually done
@ 2025-03-13 8:30 Dominik Csapak
2025-03-13 9:32 ` [pve-devel] applied: " Wolfgang Bumiller
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2025-03-13 8:30 UTC (permalink / raw)
To: pve-devel
we cleaned up extracted images, but logged it even for non extracted
ones. Only log this when we actually cleaned anything up.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
PVE/API2/Qemu.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index dc8915a7..156b1c7b 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -492,8 +492,10 @@ my sub create_disks : prototype($$$$$$$$$$$) {
= $import_from_volid->($storecfg, $source, $dest_info, $vollist);
# remove extracted volumes after importing
- PVE::Storage::vdisk_free($storecfg, $source) if $needs_extraction;
- print "cleaned up extracted image $source\n";
+ if ($needs_extraction) {
+ PVE::Storage::vdisk_free($storecfg, $source);
+ print "cleaned up extracted image $source\n";
+ }
@$vollist = grep { $_ ne $source } @$vollist;
};
die "cannot import from '$source' - $@" if $@;
--
2.39.5
_______________________________________________
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] api: create disks: only log cleanup if it's actually done
2025-03-13 8:30 [pve-devel] [PATCH qemu-server] api: create disks: only log cleanup if it's actually done Dominik Csapak
@ 2025-03-13 9:32 ` Wolfgang Bumiller
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bumiller @ 2025-03-13 9:32 UTC (permalink / raw)
To: Dominik Csapak; +Cc: pve-devel
applied, thanks
On Thu, Mar 13, 2025 at 09:30:26AM +0100, Dominik Csapak wrote:
> we cleaned up extracted images, but logged it even for non extracted
> ones. Only log this when we actually cleaned anything up.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> PVE/API2/Qemu.pm | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index dc8915a7..156b1c7b 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -492,8 +492,10 @@ my sub create_disks : prototype($$$$$$$$$$$) {
> = $import_from_volid->($storecfg, $source, $dest_info, $vollist);
>
> # remove extracted volumes after importing
> - PVE::Storage::vdisk_free($storecfg, $source) if $needs_extraction;
> - print "cleaned up extracted image $source\n";
> + if ($needs_extraction) {
> + PVE::Storage::vdisk_free($storecfg, $source);
> + print "cleaned up extracted image $source\n";
> + }
> @$vollist = grep { $_ ne $source } @$vollist;
> };
> die "cannot import from '$source' - $@" if $@;
> --
> 2.39.5
_______________________________________________
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:[~2025-03-13 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-13 8:30 [pve-devel] [PATCH qemu-server] api: create disks: only log cleanup if it's actually done Dominik Csapak
2025-03-13 9:32 ` [pve-devel] applied: " Wolfgang Bumiller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal