From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 6311A1FF13F for ; Thu, 18 Jun 2026 14:40:44 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7C26818118; Thu, 18 Jun 2026 14:40:42 +0200 (CEST) Date: Thu, 18 Jun 2026 14:40:37 +0200 From: Arthur Bied-Charreton To: Jakob Klocker Subject: Re: [PATCH qemu-server] fix #7697: snapshot hook name mismatch Message-ID: References: <20260612100758.116697-1-j.klocker@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260612100758.116697-1-j.klocker@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1781786379977 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.756 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 5RNZFZAVMCJ5KXBGSELJTVIVZIJXLGWU X-Message-ID-Hash: 5RNZFZAVMCJ5KXBGSELJTVIVZIJXLGWU X-MailFrom: a.bied-charreton@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, Jun 12, 2026 at 12:07:58PM +0200, Jakob Klocker wrote: > pve-guest-common invokes the snapshot hook with the name > "after-unfreeze" [0], but qemu-server checks for "after-freeze" [1]. > > As a result, the post-unfreeze hook is never executed and the > query-savevm polling loop intended to wait for savevm-end cleanup > is skipped. > > [0] https://git.proxmox.com/?p=pve-guest-common.git;a=blob;f=src/PVE/AbstractConfig.pm;h=7bcae1943094f99e98a8ba19428e1f90d4936080;hb=572ed3533d5ba75e82a5a0e367e2db1aff290c09#l868 > [1] https://git.proxmox.com/?p=qemu-server.git;a=blob;f=src/PVE/QemuConfig.pm;h=80a3999e85886b603bdb1b5a8d3d2b3887dff369;hb=bef9334af96eb30cab8d1f5c41c0974eaf0bbdc4#l374 > > Link: https://bugzilla.proxmox.com/show_bug.cgi?id=7697 > Signed-off-by: Jakob Klocker > --- > src/PVE/QemuConfig.pm | 2 +- > src/test/snapshot-test.pm | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm > index 80a3999e..c24eb835 100644 > --- a/src/PVE/QemuConfig.pm > +++ b/src/PVE/QemuConfig.pm > @@ -371,7 +371,7 @@ sub __snapshot_create_vol_snapshots_hook { > if $snap->{vmstate}; > }; > warn $@ if $@; > - } elsif ($hook eq "after-freeze") { > + } elsif ($hook eq "after-unfreeze") { > # savevm-end is async, we need to wait > for (;;) { > my $stat = mon_cmd($vmid, "query-savevm"); > diff --git a/src/test/snapshot-test.pm b/src/test/snapshot-test.pm > index e28107b9..3e3b9412 100644 > --- a/src/test/snapshot-test.pm > +++ b/src/test/snapshot-test.pm > @@ -379,12 +379,13 @@ sub qmp_cmd { > if ($exec eq "savevm-end") { > die "savevm-end disabled\n" > if !$vm_mon->{savevm_end}; > + $vm_mon->{savevm_ended} = 1; > return; > } > if ($exec eq "query-savevm") { > return { > "status" => "completed", > - "bytes" => 1024 * 1024 * 1024, > + "bytes" => $vm_mon->{savevm_ended} ? 0 : 1024 * 1024 * 1024, > "total-time" => 5000, > }; > } > -- > 2.47.3 > I tested the series fixing #5032 [0], which depends on this, and the after-unfreeze hook is indeed executed. Consider this: Tested-by: Arthur Bied-Charreton [0] https://lore.proxmox.com/all/20260612122942.181958-1-j.klocker@proxmox.com/T/#u