[pve-devel] applied: [PATCH storage] prune {validate, mark}: preserve input parameter

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Sep 9 18:09:37 CEST 2021


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

applied, thanks!




More information about the pve-devel mailing list