From: Fiona Ebner <f.ebner@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server v3 2/3] qm cleanup: die early when encountering a running stop mode backup
Date: Wed, 13 May 2026 17:08:19 +0200 [thread overview]
Message-ID: <e49e189e-4482-4a06-8b0c-803cdb73c35f@proxmox.com> (raw)
In-Reply-To: <20260226140752.1792378-3-d.csapak@proxmox.com>
Am 26.02.26 um 3:07 PM schrieb Dominik Csapak:
> this is an expected situation, so abort here early with a better message
> than 'vm still running'
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
with one nit below
> ---
> src/PVE/CLI/qm.pm | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/PVE/CLI/qm.pm b/src/PVE/CLI/qm.pm
> index b7bc4d9f..6aff5b7a 100755
> --- a/src/PVE/CLI/qm.pm
> +++ b/src/PVE/CLI/qm.pm
> @@ -1102,6 +1102,13 @@ __PACKAGE__->register_method({
> sub {
> my $conf = PVE::QemuConfig->load_config($vmid);
> my $pid = PVE::QemuServer::check_running($vmid);
> +
> + # With a stop mode backup, we might run here into a running vm with a backup
> + # lock, but this already did the cleanup and is an expected state, so abort
> + # here with a good message
> + die "skipping cleanup - 'backup' lock is present and vm is running again\n"
> + if $pid && $clean && $conf->{lock} && $conf->{lock} eq 'backup';
> +
> die "vm still running\n" if $pid;
Nit: both could be grouped inside an if ($pid) branch for slightly
improved clarity
>
> # Rollback already does cleanup when preparing and afterwards temporarily drops the
next prev parent reply other threads:[~2026-05-13 15:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 13:51 [PATCH qemu-server v3 0/3] improve guest cleanup handling Dominik Csapak
2026-02-26 13:52 ` [PATCH qemu-server v3 1/3] cleanup: refactor to make cleanup flow consistent Dominik Csapak
2026-02-27 11:44 ` Dominik Csapak
2026-05-13 15:02 ` Fiona Ebner
2026-02-26 13:52 ` [PATCH qemu-server v3 2/3] qm cleanup: die early when encountering a running stop mode backup Dominik Csapak
2026-05-13 15:08 ` Fiona Ebner [this message]
2026-02-26 13:52 ` [PATCH qemu-server v3 3/3] fix #7119: qm cleanup: wait for process exiting for up to 30 seconds Dominik Csapak
2026-04-15 7:14 ` Benjamin McGuire
2026-05-13 15:14 ` Fiona Ebner
2026-05-13 15:19 ` Fiona Ebner
2026-05-15 9:52 ` Dominik Csapak
2026-05-15 10:12 ` Fiona Ebner
2026-04-14 11:42 ` [PATCH qemu-server v3 0/3] improve guest cleanup handling Dominik Csapak
2026-05-15 10:09 ` superseded: " Dominik Csapak
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=e49e189e-4482-4a06-8b0c-803cdb73c35f@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=d.csapak@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