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 0DCC268ECA for ; Fri, 15 Jan 2021 13:49:41 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EE70C24E72 for ; Fri, 15 Jan 2021 13:49:10 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 firstgate.proxmox.com (Proxmox) with ESMTPS id 60D8824E68 for ; Fri, 15 Jan 2021 13:49:09 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 24AC840B95 for ; Fri, 15 Jan 2021 13:49:09 +0100 (CET) From: Fabian Ebner To: pve-devel@lists.proxmox.com Date: Fri, 15 Jan 2021 13:49:05 +0100 Message-Id: <20210115124905.5076-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.008 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [vzdump.pm, proxmox.com] Subject: [pve-devel] [PATCH manager] vzdump: avoid parsing already parsed option 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: Fri, 15 Jan 2021 12:49:41 -0000 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 --- 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