From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 9301899E11 for ; Thu, 4 May 2023 08:08:33 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6BDC91A14D for ; Thu, 4 May 2023 08:08:03 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 4 May 2023 08:08:02 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 730ED4733A for ; Thu, 4 May 2023 08:08:02 +0200 (CEST) Date: Thu, 4 May 2023 08:08:01 +0200 From: Christoph Heiss To: Proxmox VE development discussion Message-ID: <20230504060801.bi7ckllzn5gpyi53@maui.proxmox.com> References: <20230323110248.344718-1-c.heiss@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230323110248.344718-1-c.heiss@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.103 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 T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: Re: [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2023 06:08:33 -0000 Ping - the API part has been merged before release 7.4 and was thus part of it. This is just the missing puzzle piece so that users can toggle it via the GUI :^) On Thu, Mar 23, 2023 at 12:02:47PM +0100, Christoph Heiss wrote: > Adds a default-on checkbox to the QEMU Guest Agent feature selector > controlling the 'fs-freeze-on-backup' option. If unchecked, an > additional warning is displayed that backups can potentially corrupt > with this setting off. > > Signed-off-by: Christoph Heiss > --- > The qemu-server part has already been applied; commit 93e21fd. > > Changes v1 -> v2: > * Rename option from 'fsfreeze_thaw' to 'freeze-fs-on-backup' > * Adapt option descriptions as suggested > > Changes v2 -> v3: > * Fold gettext() onto one line, as the parser does not support multiple > lines (yet) > * Change let -> const declaration > > www/manager6/Utils.js | 2 ++ > www/manager6/form/AgentFeatureSelector.js | 30 ++++++++++++++++++++++- > 2 files changed, 31 insertions(+), 1 deletion(-) > > diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js > index d8c0bf5a..e6c7861a 100644 > --- a/www/manager6/Utils.js > +++ b/www/manager6/Utils.js > @@ -475,6 +475,8 @@ Ext.define('PVE.Utils', { > virtio: "VirtIO", > }; > displayText = map[value] || Proxmox.Utils.unknownText; > + } else if (key === 'freeze-fs-on-backup' && PVE.Parser.parseBoolean(value)) { > + continue; > } else if (PVE.Parser.parseBoolean(value)) { > displayText = Proxmox.Utils.enabledText; > } > diff --git a/www/manager6/form/AgentFeatureSelector.js b/www/manager6/form/AgentFeatureSelector.js > index 0dcc6ecb..81ea42ea 100644 > --- a/www/manager6/form/AgentFeatureSelector.js > +++ b/www/manager6/form/AgentFeatureSelector.js > @@ -21,6 +21,26 @@ Ext.define('PVE.form.AgentFeatureSelector', { > }, > disabled: true, > }, > + { > + xtype: 'proxmoxcheckbox', > + boxLabel: gettext('Freeze/thaw guest filesystems on backup for consistency'), > + name: 'freeze-fs-on-backup', > + reference: 'freeze_fs_on_backup', > + bind: { > + disabled: '{!enabled.checked}', > + }, > + disabled: true, > + uncheckedValue: '0', > + defaultValue: '1', > + }, > + { > + xtype: 'displayfield', > + userCls: 'pmx-hint', > + value: gettext('Freeze/thaw for guest filesystems disabled. This can lead to inconsistent disk backups.'), > + bind: { > + hidden: '{freeze_fs_on_backup.checked}', > + }, > + }, > { > xtype: 'displayfield', > userCls: 'pmx-hint', > @@ -47,12 +67,20 @@ Ext.define('PVE.form.AgentFeatureSelector', { > ], > > onGetValues: function(values) { > - var agentstr = PVE.Parser.printPropertyString(values, 'enabled'); > + if (PVE.Parser.parseBoolean(values['freeze-fs-on-backup'])) { > + delete values['freeze-fs-on-backup']; > + } > + > + const agentstr = PVE.Parser.printPropertyString(values, 'enabled'); > return { agent: agentstr }; > }, > > setValues: function(values) { > let res = PVE.Parser.parsePropertyString(values.agent, 'enabled'); > + if (!Ext.isDefined(res['freeze-fs-on-backup'])) { > + res['freeze-fs-on-backup'] = 1; > + } > + > this.callParent([res]); > }, > }); > -- > 2.39.2 > > > > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > >