[pve-devel] [RFC manager 2/3] vzdump: exec_backup: pick up latest version of storage.cfg after job-start hook

Fabian Ebner f.ebner at proxmox.com
Thu Dec 2 12:00:04 CET 2021


Without this, a storage that is enabled during the job-start hook
would still be seen as disabled.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

Makes sense in the context of #3476, so that the storage that is only online
e.g. once a day doesn't need to be kept enabled. But it also means that we have
to be careful not to assert that a storage is enabled before the pre-start hook
in the future.

 PVE/VZDump.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 667c92d3..8c70906d 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -1165,6 +1165,7 @@ sub exec_backup {
 
 	$self->run_hook_script ('job-start', undef, $job_start_fd);
 
+	PVE::Cluster::cfs_update(); # Pick up eventual changes made by the hook script.
 	my $storage_cfg = PVE::Storage::config();
 
 	# activating after job-start hook, so it has a chance to prepare, e.g. wake up remote node.
-- 
2.30.2






More information about the pve-devel mailing list