[pve-devel] [RFC manager 3/3] vzdump: new: add reminder to get rid of duplicate activate_storage
Fabian Ebner
f.ebner at proxmox.com
Thu Dec 2 12:00:05 CET 2021
While it's unlikely that something breaks in practice, because
pvestatd calls activate_storage() for enabled storages every few
seconds, there's no rush to remove the duplicate call.
What could require the storage to be active between the activation in
new() and the activation in exec_backup() is:
1. An external storage plugin that requires the storage to be active
for its get_subdir() implementation (unlikely to exist).
2. A job-start hook-script that requires the storage to be active.
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
PVE/VZDump.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 8c70906d..4a28e74f 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -501,6 +501,7 @@ sub new {
if ($opts->{storage}) {
my $storage_cfg = PVE::Storage::config();
+ # FIXME: remove for PVE 8.0
# Ignore errors here. exec_backup will die if activation fails there.
eval { PVE::Storage::activate_storage($storage_cfg, $opts->{storage}) };
--
2.30.2
More information about the pve-devel
mailing list