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 5957D6877C for ; Thu, 9 Sep 2021 18:10:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4D970AC46 for ; Thu, 9 Sep 2021 18:10:11 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 39B29AC35 for ; Thu, 9 Sep 2021 18:10:10 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 01CF644654 for ; Thu, 9 Sep 2021 18:10:10 +0200 (CEST) Message-ID: Date: Thu, 9 Sep 2021 18:09:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:92.0) Gecko/20100101 Thunderbird/92.0 Content-Language: en-US To: Proxmox VE development discussion , Fabian Ebner References: <20210909095801.101797-1-f.ebner@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210909095801.101797-1-f.ebner@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.292 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] applied: [PATCH storage] prune {validate, mark}: preserve input parameter 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: Thu, 09 Sep 2021 16:10:41 -0000 On 09.09.21 11:58, Fabian Ebner wrote: > While the current way to detect settings like { 'keep-last' => 0 } is > concise, it's also wrong, because but the delete operation is visible > to the caller. This resulted in e.g. > # $hash is { 'keep-all' => 1 } > my $s = print_property_string($hash, 'prune-backups'); > # $hash is now {}, $s is 'keep-all=1' > because validation is called in print_property_string. The same issue > is present when calling prune_mark_backup_group. > > Because validation complains when keep-all and something else is set, > this shouldn't have caused any real issues, besides vzdump with > keep-all=1 wrongly taking the removal path, but without any settings, > so not removing anything: > INFO: prune older backups with retention: > INFO: pruned 0 backup(s) > > Signed-off-by: Fabian Ebner > --- > PVE/Storage.pm | 5 ++--- > PVE/Storage/Plugin.pm | 7 ++++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > applied, thanks!