public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 1/2] ui: manual backup: also set notes-template default
@ 2022-05-09  7:17 Fabian Ebner
  2022-05-09  7:17 ` [pve-devel] [PATCH manager 2/2] configs: vzdump: add " Fabian Ebner
  0 siblings, 1 reply; 5+ messages in thread
From: Fabian Ebner @ 2022-05-09  7:17 UTC (permalink / raw)
  To: pve-devel

like is done for other vzdump options already.

Requested in the community forum:
https://forum.proxmox.com/threads/108970/#post-468655

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 www/manager6/window/Backup.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js
index f77e9ffa..a0ea0846 100644
--- a/www/manager6/window/Backup.js
+++ b/www/manager6/window/Backup.js
@@ -113,6 +113,10 @@ Ext.define('PVE.window.Backup', {
 			    if (!initialDefaults && data.mode !== undefined) {
 				modeSelector.setValue(data.mode);
 			    }
+			    if (!initialDefaults && (data['notes-template'] ?? false)) {
+				me.down('field[name=notes-template]')
+				    .setValue(data['notes-template']);
+			    }
 
 			    initialDefaults = true;
 
-- 
2.30.2





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

* [pve-devel] [PATCH manager 2/2] configs: vzdump: add notes-template default
  2022-05-09  7:17 [pve-devel] [PATCH manager 1/2] ui: manual backup: also set notes-template default Fabian Ebner
@ 2022-05-09  7:17 ` Fabian Ebner
  2022-05-09  7:46   ` Fabian Ebner
  2022-05-09 11:52   ` Thomas Lamprecht
  0 siblings, 2 replies; 5+ messages in thread
From: Fabian Ebner @ 2022-05-09  7:17 UTC (permalink / raw)
  To: pve-devel

so users can see that it can be configured here.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---

Causes a "configuration changed by distributor" dialogue when
upgrading the package.

 configs/vzdump.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/vzdump.conf b/configs/vzdump.conf
index a0075cfa..fe4b18ab 100644
--- a/configs/vzdump.conf
+++ b/configs/vzdump.conf
@@ -14,3 +14,4 @@
 #script: FILENAME
 #exclude-path: PATHLIST
 #pigz: N
+#notes-template: {{guestname}}
-- 
2.30.2





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

* Re: [pve-devel] [PATCH manager 2/2] configs: vzdump: add notes-template default
  2022-05-09  7:17 ` [pve-devel] [PATCH manager 2/2] configs: vzdump: add " Fabian Ebner
@ 2022-05-09  7:46   ` Fabian Ebner
  2022-05-09 11:52   ` Thomas Lamprecht
  1 sibling, 0 replies; 5+ messages in thread
From: Fabian Ebner @ 2022-05-09  7:46 UTC (permalink / raw)
  To: pve-devel

Am 09.05.22 um 09:17 schrieb Fabian Ebner:
> so users can see that it can be configured here.
> 
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
> 
> Causes a "configuration changed by distributor" dialogue when
> upgrading the package.
> 
>  configs/vzdump.conf | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configs/vzdump.conf b/configs/vzdump.conf
> index a0075cfa..fe4b18ab 100644
> --- a/configs/vzdump.conf
> +++ b/configs/vzdump.conf
> @@ -14,3 +14,4 @@
>  #script: FILENAME
>  #exclude-path: PATHLIST
>  #pigz: N
> +#notes-template: {{guestname}}

There's a cosmetic issue here. I get
parse error in '/etc/vzdump.conf' - 'storage': missing property -
'notes-template' requires this property
if notes-template is configured, but storage isn't. It still works, but
is very misleading. I'll work out a v2.




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

* Re: [pve-devel] [PATCH manager 2/2] configs: vzdump: add notes-template default
  2022-05-09  7:17 ` [pve-devel] [PATCH manager 2/2] configs: vzdump: add " Fabian Ebner
  2022-05-09  7:46   ` Fabian Ebner
@ 2022-05-09 11:52   ` Thomas Lamprecht
  2022-05-10  6:59     ` Fabian Ebner
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Lamprecht @ 2022-05-09 11:52 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Ebner

On 09/05/2022 09:17, Fabian Ebner wrote:
> so users can see that it can be configured here.
> 
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
> 
> Causes a "configuration changed by distributor" dialogue when
> upgrading the package.
> 
>  configs/vzdump.conf | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configs/vzdump.conf b/configs/vzdump.conf
> index a0075cfa..fe4b18ab 100644
> --- a/configs/vzdump.conf
> +++ b/configs/vzdump.conf
> @@ -14,3 +14,4 @@
>  #script: FILENAME
>  #exclude-path: PATHLIST
>  #pigz: N
> +#notes-template: {{guestname}}

not sure if a node specific config is a good place for this, I'd think no config
(frontend-only) or if we really want one then maybe datacenter.cfg so that its
cluster wide; we could alternatively also start supporting to have a pmxcfs hosted
vzdump.conf that is read too (node one would still take precedence if a setting
appears in both).




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

* Re: [pve-devel] [PATCH manager 2/2] configs: vzdump: add notes-template default
  2022-05-09 11:52   ` Thomas Lamprecht
@ 2022-05-10  6:59     ` Fabian Ebner
  0 siblings, 0 replies; 5+ messages in thread
From: Fabian Ebner @ 2022-05-10  6:59 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox VE development discussion

Am 09.05.22 um 13:52 schrieb Thomas Lamprecht:
> On 09/05/2022 09:17, Fabian Ebner wrote:
>> so users can see that it can be configured here.
>>
>> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
>> ---
>>
>> Causes a "configuration changed by distributor" dialogue when
>> upgrading the package.
>>
>>  configs/vzdump.conf | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/configs/vzdump.conf b/configs/vzdump.conf
>> index a0075cfa..fe4b18ab 100644
>> --- a/configs/vzdump.conf
>> +++ b/configs/vzdump.conf
>> @@ -14,3 +14,4 @@
>>  #script: FILENAME
>>  #exclude-path: PATHLIST
>>  #pigz: N
>> +#notes-template: {{guestname}}
> 
> not sure if a node specific config is a good place for this, I'd think no config
> (frontend-only) or if we really want one then maybe datacenter.cfg so that its
> cluster wide; we could alternatively also start supporting to have a pmxcfs hosted
> vzdump.conf that is read too (node one would still take precedence if a setting
> appears in both).

Yes, adding a cluster-wide vzdump.conf could be worth it for such
options. I still think we can leverage the existing mechanism of the
node-specific defaults though. It already works for CLI and backup jobs
that don't set notes-template themselves.

It's just not filled-in the UI yet, like we do for mail address, backup
mode and prune-settings, the first two of which also don't feel very
node-specific to me. Of course having them be node-specific adds a
little bit of extra flexibility, but that'd apply to notes-template too.

This patch is just for documentation, but '{{guestname}}' is not the
back-end default, which the patch might suggest. It's probably better to
instead write
#notes-template: TEMPLATE-STRING




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

end of thread, other threads:[~2022-05-10  7:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  7:17 [pve-devel] [PATCH manager 1/2] ui: manual backup: also set notes-template default Fabian Ebner
2022-05-09  7:17 ` [pve-devel] [PATCH manager 2/2] configs: vzdump: add " Fabian Ebner
2022-05-09  7:46   ` Fabian Ebner
2022-05-09 11:52   ` Thomas Lamprecht
2022-05-10  6:59     ` Fabian Ebner

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