public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 1/2] vzdump: warn when both storage and dumpdir are defined in vzdump.conf
@ 2020-12-04  9:15 Fabian Ebner
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Fabian Ebner @ 2020-12-04  9:15 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-07  9:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04  9:15 [pve-devel] [PATCH manager 1/2] vzdump: warn when both storage and dumpdir are defined in vzdump.conf Fabian Ebner
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

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