From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 3/3] jobs: vzdump: fixup prune-schedule conf
Date: Fri, 12 Nov 2021 13:37:27 +0100 [thread overview]
Message-ID: <20211112123727.232334-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20211112123727.232334-1-d.csapak@proxmox.com>
when we parse the config, we get the 'prune-backup' decoded, but the
api call we use wants it as a property string, so encode it here again
this fixes having jobs with prune options
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
PVE/Jobs/VZDump.pm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/PVE/Jobs/VZDump.pm b/PVE/Jobs/VZDump.pm
index 92b81147..c757eea1 100644
--- a/PVE/Jobs/VZDump.pm
+++ b/PVE/Jobs/VZDump.pm
@@ -72,6 +72,12 @@ sub run {
delete $conf->{$opt} if !defined($props->{$opt});
}
+ # fixup prune-backups, we get it decoded but want it as string parameter
+ $conf->{'prune-backups'} = PVE::JSONSchema::print_property_string(
+ $conf->{'prune-backups'},
+ 'prune-backups',
+ ) if $conf->{'prune-backups'} && ref($conf->{'prune-backups'}) eq 'HASH';
+
$conf->{quiet} = 1; # do not write to stdout/stderr
PVE::Cluster::cfs_update(); # refresh vmlist
--
2.30.2
next prev parent reply other threads:[~2021-11-12 12:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 12:37 [pve-devel] [PATCH manager 1/3] api/services: sort service list Dominik Csapak
2021-11-12 12:37 ` [pve-devel] [PATCH manager 2/3] api/services: add pvescheduler to the " Dominik Csapak
2021-11-12 12:37 ` Dominik Csapak [this message]
2021-11-12 15:43 ` [pve-devel] applied-series: [PATCH manager 1/3] api/services: sort " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211112123727.232334-3-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal