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 DEB0E622AA for ; Thu, 20 Aug 2020 13:50:16 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D443D2C9FC for ; Thu, 20 Aug 2020 13:50:16 +0200 (CEST) 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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 28A622C9F1 for ; Thu, 20 Aug 2020 13:50:16 +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 E8E1B44741 for ; Thu, 20 Aug 2020 13:50:15 +0200 (CEST) From: Fabian Ebner To: pve-devel@lists.proxmox.com Date: Thu, 20 Aug 2020 13:50:09 +0200 Message-Id: <20200820115010.14106-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.023 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. [pvesm.pm, prunebackups.pm] Subject: [pve-devel] [PATCH storage 1/2] prune_backups: fix message 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, 20 Aug 2020 11:50:16 -0000 For prune selections, it doesn't matter what the current time is, only the timestamps of the backups matter. Signed-off-by: Fabian Ebner --- Sorry for missing this when I sent the series. PVE/API2/Storage/PruneBackups.pm | 5 ++--- PVE/CLI/pvesm.pm | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/PVE/API2/Storage/PruneBackups.pm b/PVE/API2/Storage/PruneBackups.pm index a84d1c8..2509a46 100644 --- a/PVE/API2/Storage/PruneBackups.pm +++ b/PVE/API2/Storage/PruneBackups.pm @@ -16,9 +16,8 @@ __PACKAGE__->register_method ({ name => 'dryrun', path => '', method => 'GET', - description => "Get prune information for backups. NOTE: this is only a preview and might not be exactly " . - "what a subsequent prune call does, if the hour changes or if backups are removed/added " . - "in the meantime.", + description => "Get prune information for backups. NOTE: this is only a preview and might not be " . + "what a subsequent prune call does if backups are removed/added in the meantime.", permissions => { check => ['perm', '/storage/{storage}', ['Datastore.Audit', 'Datastore.AllocateSpace'], any => 1], }, diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm index cc03e37..93ef977 100755 --- a/PVE/CLI/pvesm.pm +++ b/PVE/CLI/pvesm.pm @@ -932,8 +932,8 @@ our $cmddef = { return if !$dryrun; - print "NOTE: this is only a preview and might not be exactly what a subsequent prune call does,\n" . - "if the hour changes or if backups are removed/added in the meantime.\n\n"; + print "NOTE: this is only a preview and might not be what a subsequent\n" . + "prune call does if backups are removed/added in the meantime.\n\n"; my @sorted = sort { my $vmcmp = PVE::Tools::safe_compare($a->{vmid}, $b->{vmid}, sub { $_[0] <=> $_[1] }); -- 2.20.1