all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/5] vzdump: defaults: convert to prune-backups early enough
Date: Mon, 21 Dec 2020 14:48:16 +0100	[thread overview]
Message-ID: <20201221134820.24038-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20201221134820.24038-1-f.ebner@proxmox.com>

Fixes the case where reading from /etc/vzdump.conf fails.

Also convert the options read from /etc/vzdump.conf before the loop. That
avoids showing a wrong warning when 'prune-backups' is configured in
/etc/vzdump.conf, and maxfiles isn't. Previously, because 'maxfiles' from the
schema defaults was automatically set, the call to parse_prune_backups_maxfiles
after the loop threw the warning that both options are defined.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 PVE/VZDump.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 6a4e641b..f75e4b16 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -211,6 +211,7 @@ sub read_vzdump_defaults {
 	     defined($default) ? ($_ => $default) : ()
 	} keys %$confdesc
     };
+    $parse_prune_backups_maxfiles->($defaults, "defaults in VZDump schema");
 
     my $raw;
     eval { $raw = PVE::Tools::file_get_contents($fn); };
@@ -225,6 +226,7 @@ sub read_vzdump_defaults {
 	my @mailto = split_list($res->{mailto});
 	$res->{mailto} = [ @mailto ];
     }
+    $parse_prune_backups_maxfiles->($res, "options in '$fn'");
 
     foreach my $key (keys %$defaults) {
 	$res->{$key} = $defaults->{$key} if !defined($res->{$key});
@@ -235,8 +237,6 @@ sub read_vzdump_defaults {
 	delete $res->{dumpdir};
     }
 
-    $parse_prune_backups_maxfiles->($res, "options in '$fn'");
-
     return $res;
 }
 
-- 
2.20.1





  reply	other threads:[~2020-12-21 13:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 13:48 [pve-devel] [PATCH-SERIES] small vzdump improvements Fabian Ebner
2020-12-21 13:48 ` Fabian Ebner [this message]
2020-12-21 14:33   ` [pve-devel] applied: Re: [PATCH manager 1/5] vzdump: defaults: convert to prune-backups early enough Thomas Lamprecht
2020-12-21 13:48 ` [pve-devel] [PATCH manager 2/5] vzdump: sendmail: fix html by closing the tags Fabian Ebner
2020-12-21 14:33   ` [pve-devel] applied: " Thomas Lamprecht
2020-12-21 13:48 ` [pve-devel] [PATCH manager 3/5] vzdump: fix error format for errors coming from storage_info Fabian Ebner
2020-12-21 14:33   ` [pve-devel] applied: " Thomas Lamprecht
2020-12-21 13:48 ` [pve-devel] [PATCH/RFC common 4/5] SectionConfig: parse_config: add errors to result Fabian Ebner
2020-12-21 14:51   ` [pve-devel] applied: " Thomas Lamprecht
2020-12-21 13:48 ` [pve-devel] [PATCH/RFC manager 5/5] vzdump: make parse error for storage critical Fabian Ebner
2020-12-21 14:56   ` Thomas Lamprecht

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=20201221134820.24038-2-f.ebner@proxmox.com \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal