all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] vzdump: avoid parsing already parsed option
Date: Fri, 15 Jan 2021 13:49:05 +0100	[thread overview]
Message-ID: <20210115124905.5076-1-f.ebner@proxmox.com> (raw)

When a job is updated, verify_vzdump_parameters() is called twice. This led to
parse_property_string being called with the already parsed option.

Reported on the pve-user mailing list:
https://lists.proxmox.com/pipermail/pve-user/2021-January/172258.html

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

The following patch is also necessary, for the cron file read/write:
https://lists.proxmox.com/pipermail/pve-devel/2020-November/046101.html

 PVE/VZDump.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index d6f9709b..a99d0565 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -79,6 +79,7 @@ my $parse_prune_backups_maxfiles = sub {
         if defined($maxfiles) && defined($prune_backups);
 
     if (defined($prune_backups)) {
+	return if ref($prune_backups) eq 'HASH'; # already parsed
 	$param->{'prune-backups'} = PVE::JSONSchema::parse_property_string(
 	    'prune-backups',
 	    $prune_backups
-- 
2.20.1





             reply	other threads:[~2021-01-15 12:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 12:49 Fabian Ebner [this message]
2021-01-26 17:48 ` [pve-devel] applied: " 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=20210115124905.5076-1-f.ebner@proxmox.com \
    --to=f.ebner@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