public inbox for pve-devel@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/2] vzdump: warn when both storage and dumpdir are defined in vzdump.conf
Date: Fri,  4 Dec 2020 10:15:17 +0100	[thread overview]
Message-ID: <20201204091518.15237-1-f.ebner@proxmox.com> (raw)

and prefer storage, because the storage configuration might contain more
settings. Warning is preferable over dying, because all backups would be
affected (even if they don't use the vzdump.conf parameters) and the settings
could've been compatible (i.e. dumpdir being the storage's dump dir). Previously
one of the two options would randomly be chosen in the loop in new(), because of
perl hash iteration.

Reported here: https://forum.proxmox.com/threads/vzdump-times-out-very-often-on-zfs-storage-pool.80035/post-354277

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

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 6892918f..2e44908a 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -230,6 +230,11 @@ sub read_vzdump_defaults {
 	$res->{$key} = $defaults->{$key} if !defined($res->{$key});
     }
 
+    if (defined($res->{storage}) && defined($res->{dumpdir})) {
+	debugmsg('warn', "both 'storage' and 'dumpdir' defined in '$fn' - ignoring 'dumpdir'");
+	delete $res->{dumpdir};
+    }
+
     $parse_prune_backups_maxfiles->($res, "options in '$fn'");
 
     return $res;
-- 
2.20.1





             reply	other threads:[~2020-12-04  9:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  9:15 Fabian Ebner [this message]
2020-12-04  9:15 ` [pve-devel] [PATCH manager 2/2] vzdump: use debugmsg instead of warn Fabian Ebner
2020-12-07  9:55 ` [pve-devel] applied-series: [PATCH manager 1/2] vzdump: warn when both storage and dumpdir are defined in vzdump.conf 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=20201204091518.15237-1-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 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