public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Fabian Ebner <f.ebner@proxmox.com>
Subject: [pve-devel] applied:  [PATCH storage] prune {validate, mark}: preserve input parameter
Date: Thu, 9 Sep 2021 18:09:37 +0200	[thread overview]
Message-ID: <e733db37-92bf-a796-b573-e13e813d9352@proxmox.com> (raw)
In-Reply-To: <20210909095801.101797-1-f.ebner@proxmox.com>

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 <f.ebner@proxmox.com>
> ---
>  PVE/Storage.pm        | 5 ++---
>  PVE/Storage/Plugin.pm | 7 ++++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
>

applied, thanks!




      reply	other threads:[~2021-09-09 16:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09  9:58 [pve-devel] " Fabian Ebner
2021-09-09 16:09 ` Thomas Lamprecht [this message]

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=e733db37-92bf-a796-b573-e13e813d9352@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal