From: Fiona Ebner <f.ebner@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
"Michael Köppl" <m.koeppl@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server v6 1/3] adapt linked clone check to not die if an error occurs during check
Date: Wed, 21 May 2025 12:49:38 +0200 [thread overview]
Message-ID: <bacc5257-d9f8-4c44-95a8-a9ea4927b059@proxmox.com> (raw)
In-Reply-To: <20250520090818.44881-6-m.koeppl@proxmox.com>
Am 20.05.25 um 11:08 schrieb Michael Köppl:
> Align error handling behavior when checking for linked clones with the
> rest of destroy_vm's error handling approach. Unlike the LXC destroy
> implementation, this version continues execution when encountering
> errors during the check, since:
>
> 1. The same validation occurs later in the process
> 2. This prevents potential crashes
What kind of crashes?
> 3. The VM removal will still be blocked if the volume has linked clones
>
> Align error handling behavior when checking for linked clones with the
> rest of destroy_vm's error handling approach. Unlike the LXC implementation,
> this version continues execution when encountering errors during the check,
> since:
This paragraph is duplicated.
>
> Co-authored-by: Stefan Hrdlicka
The qemu-server patches still need to have the trailer adapted.
> Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
> ---
> PVE/QemuServer.pm | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 577959a4..e02bf7d4 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -2116,9 +2116,10 @@ sub destroy_vm {
> my $volid = $drive->{file};
> return if !$volid || $volid =~ m|^/|;
>
> - die "base volume '$volid' is still in use by linked cloned\n"
> - if PVE::Storage::volume_is_base_and_used($storecfg, $volid);
> -
> + # errors that occur during this check are not propagated since the
> + # same check is done again in vdisk_free
For containers, you do propagate the error. Please adapt the code there
too to make it consistent. I'd also add a warning or print an
informational message about the failure, rather than quietly ignoring it.
> + my $result = eval { PVE::Storage::volume_is_base_and_used($storecfg, $volid) };
> + die "base volume '$volid' is still in use by linked cloned\n" if $result;
> });
> }
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-05-21 10:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 9:08 [pve-devel] [PATCH container/qemu-server v6 0/7] fix #3711 and adapt drive detach/remove behavior Michael Köppl
2025-05-20 9:08 ` [pve-devel] [PATCH container v6 1/4] fix #3711: lxc: print warning if storage for mounted volume does not exist anymore Michael Köppl
2025-05-20 13:33 ` Fiona Ebner
2025-05-22 6:08 ` Thomas Lamprecht
2025-05-27 7:37 ` Michael Köppl
2025-05-22 6:17 ` Thomas Lamprecht
2025-05-27 7:29 ` Michael Köppl via pve-devel
2025-05-20 9:08 ` [pve-devel] [PATCH container v6 2/4] config: apply_pending: get unused volid through parse_volume() Michael Köppl
2025-05-20 13:45 ` Fiona Ebner
2025-05-20 13:49 ` Fiona Ebner
2025-05-20 9:08 ` [pve-devel] [PATCH container v6 3/4] fix #3711: lxc: allow removing unused mp if storage no longer exists Michael Köppl
2025-05-20 14:03 ` Fiona Ebner
2025-05-27 9:34 ` Michael Köppl
2025-05-27 10:03 ` Fiona Ebner
2025-05-20 9:08 ` [pve-devel] [PATCH container v6 4/4] add linked clone check when destroying container Michael Köppl
2025-05-20 14:13 ` Fiona Ebner
2025-05-20 9:08 ` [pve-devel] [PATCH qemu-server v6 1/3] adapt linked clone check to not die if an error occurs during check Michael Köppl
2025-05-21 10:49 ` Fiona Ebner [this message]
2025-05-20 9:08 ` [pve-devel] [PATCH qemu-server v6 2/3] print warning for PVE::Storage::path errors instead of failing Michael Köppl
2025-05-21 11:02 ` Fiona Ebner
2025-05-20 9:08 ` [pve-devel] [PATCH qemu-server v6 3/3] mark volumes pending detach as unused if storage was removed Michael Köppl
2025-05-21 11:16 ` Fiona Ebner
2025-05-26 12:24 ` Michael Köppl
2025-05-27 16:05 ` [pve-devel] superseded: [PATCH container/qemu-server v6 0/7] fix #3711 and adapt drive detach/remove behavior Michael Köppl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bacc5257-d9f8-4c44-95a8-a9ea4927b059@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=m.koeppl@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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