From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 0CCE21FF13F for ; Thu, 26 Mar 2026 13:55:50 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6A010119C8; Thu, 26 Mar 2026 13:56:12 +0100 (CET) Message-ID: <2dea817d-e523-4036-aad7-f1b7543bf3f2@proxmox.com> Date: Thu, 26 Mar 2026 13:55:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH qemu-server v2 2/4] agent: treat freeze-fs-on-backup as alias for guest-fsfreeze To: Thomas Lamprecht , pve-devel@lists.proxmox.com References: <20260325213415.3861690-1-t.lamprecht@proxmox.com> <20260325213415.3861690-3-t.lamprecht@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20260325213415.3861690-3-t.lamprecht@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774529686543 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.005 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: ZV5MKR4DHBE5OT6AKDIT5E4FC7HXXCOV X-Message-ID-Hash: ZV5MKR4DHBE5OT6AKDIT5E4FC7HXXCOV X-MailFrom: f.ebner@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 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 25.03.26 um 10:34 PM schrieb Thomas Lamprecht: > Alias the deprecated key to 'guest-fsfreeze' through the JSONSchema > alias key support so consumers see a single, consistent value. > Previously only the backup code path fell back to it, while snapshots, > replications, clones and imports silently ignored it. > > Note that while alias support for top-level JSON schema has a bug [0], > the one for property strings - which this here is - works out fine. > > [0]: https://lore.proxmox.com/all/20251205100317.1101549-1-d.csapak@proxmox.com/ > > The key stays in the schema indefinitely for old backup restore > compatibility rather than being removed in a future major release. > One potentially surprising thing (I guess another bug in JSONSchema?) is that it's possible to set qm set 100 --agent 1,freeze-fs=0,freeze-fs-on-backup=1 and the second option (which in this case is the deprecated one) will then override the first when parsing. The check for duplicate keys precedes the resolution of the alias in parse_property_string(): https://git.proxmox.com/?p=pve-common.git;a=blob;f=src/PVE/JSONSchema.pm;h=17e7126a6c42f8326a1da890680af10b6106d906;hb=17c6c3bdcf018756b4b48589b5485663103a9843#l1069 > Signed-off-by: Thomas Lamprecht Reviewed-by: Fiona Ebner with two nits below: ---snip--- > @@ -77,6 +73,7 @@ sub parse_guest_agent { > > # if the agent is disabled ignore the other potentially set properties > return {} if !$res->{enabled}; > + > return $res; > } Nit: unrelated change > > diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm > index 0681661d..9f3cd191 100644 > --- a/src/PVE/VZDump/QemuServer.pm > +++ b/src/PVE/VZDump/QemuServer.pm > @@ -1108,11 +1108,7 @@ sub qga_fs_freeze { > return; > } > > - my $freeze = PVE::QemuServer::Agent::get_qga_key($conf, 'guest-fsfreeze'); > - $freeze //= PVE::QemuServer::Agent::get_qga_key($conf, 'freeze-fs-on-backup'); > - $freeze //= 1; > - > - if (!$freeze) { > + if (!PVE::QemuServer::Agent::should_fs_freeze($self->{vmlist}->{$vmid})) { Nit: could re-use $conf > $self->loginfo("skipping guest-agent 'fs-freeze', disabled in VM options"); > return; > }