public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup
@ 2023-03-23 11:02 Christoph Heiss
  2023-03-23 11:02 ` [pve-devel] [PATCH v3 docs 2/2] Revert "qm: freeze-fs-on-backup: remove reference to GUI" Christoph Heiss
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Christoph Heiss @ 2023-03-23 11:02 UTC (permalink / raw)
  To: pve-devel

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 <c.heiss@proxmox.com>
---
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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pve-devel] [PATCH v3 docs 2/2] Revert "qm: freeze-fs-on-backup: remove reference to GUI"
  2023-03-23 11:02 [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup Christoph Heiss
@ 2023-03-23 11:02 ` Christoph Heiss
  2023-06-07 16:28   ` [pve-devel] applied: " Thomas Lamprecht
  2023-05-04  6:08 ` [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup Christoph Heiss
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Christoph Heiss @ 2023-03-23 11:02 UTC (permalink / raw)
  To: pve-devel

This reverts commit 0025e843194130ec5223d5789fa01f916d189783.
The option is now also exposed in the GUI.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Changes v2 -> v3:
 * New patch

 qm.adoc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/qm.adoc b/qm.adoc
index 0726b29..15ac2fc 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -1089,8 +1089,9 @@ Writer VSS module in a mode that breaks the SQL Server backup chain for
 differential backups.

 For such setups you can configure {pve} to not issue a freeze-and-thaw cycle on
-backup by setting the `freeze-fs-on-backup` QGA option to `0`. This option can
-be set via the CLI or the API.
+backup by setting the `freeze-fs-on-backup` QGA option to `0`. This can also be
+done via the GUI with the 'Freeze/thaw guest filesystems on backup for
+consistency' option.

 IMPORTANT: Disabling this option can potentially lead to backups with inconsistent
 filesystems and should therefore only be disabled if you know what you are
--
2.39.2





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup
  2023-03-23 11:02 [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup Christoph Heiss
  2023-03-23 11:02 ` [pve-devel] [PATCH v3 docs 2/2] Revert "qm: freeze-fs-on-backup: remove reference to GUI" Christoph Heiss
@ 2023-05-04  6:08 ` Christoph Heiss
  2023-05-04 14:58 ` Lukas Wagner
  2023-06-07 16:28 ` [pve-devel] applied: " Thomas Lamprecht
  3 siblings, 0 replies; 6+ messages in thread
From: Christoph Heiss @ 2023-05-04  6:08 UTC (permalink / raw)
  To: Proxmox VE development discussion

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 <c.heiss@proxmox.com>
> ---
> 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
>
>




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup
  2023-03-23 11:02 [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup Christoph Heiss
  2023-03-23 11:02 ` [pve-devel] [PATCH v3 docs 2/2] Revert "qm: freeze-fs-on-backup: remove reference to GUI" Christoph Heiss
  2023-05-04  6:08 ` [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup Christoph Heiss
@ 2023-05-04 14:58 ` Lukas Wagner
  2023-06-07 16:28 ` [pve-devel] applied: " Thomas Lamprecht
  3 siblings, 0 replies; 6+ messages in thread
From: Lukas Wagner @ 2023-05-04 14:58 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Gave this a quick test and reviewed the changes - looks good to me.

Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>

On 3/23/23 12:02, 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.

-- 
- Lukas




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pve-devel] applied: [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup
  2023-03-23 11:02 [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup Christoph Heiss
                   ` (2 preceding siblings ...)
  2023-05-04 14:58 ` Lukas Wagner
@ 2023-06-07 16:28 ` Thomas Lamprecht
  3 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2023-06-07 16:28 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 23/03/2023 um 12:02 schrieb Christoph Heiss:
> 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 <c.heiss@proxmox.com>
> ---
> 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(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pve-devel] applied: [PATCH v3 docs 2/2] Revert "qm: freeze-fs-on-backup: remove reference to GUI"
  2023-03-23 11:02 ` [pve-devel] [PATCH v3 docs 2/2] Revert "qm: freeze-fs-on-backup: remove reference to GUI" Christoph Heiss
@ 2023-06-07 16:28   ` Thomas Lamprecht
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2023-06-07 16:28 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 23/03/2023 um 12:02 schrieb Christoph Heiss:
> This reverts commit 0025e843194130ec5223d5789fa01f916d189783.
> The option is now also exposed in the GUI.
> 
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
> Changes v2 -> v3:
>  * New patch
> 
>  qm.adoc | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-07 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 11:02 [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup Christoph Heiss
2023-03-23 11:02 ` [pve-devel] [PATCH v3 docs 2/2] Revert "qm: freeze-fs-on-backup: remove reference to GUI" Christoph Heiss
2023-06-07 16:28   ` [pve-devel] applied: " Thomas Lamprecht
2023-05-04  6:08 ` [pve-devel] [PATCH v3 manager 1/2] ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup Christoph Heiss
2023-05-04 14:58 ` Lukas Wagner
2023-06-07 16:28 ` [pve-devel] applied: " Thomas Lamprecht

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