From 38431808b4bdab030fdf27497bc51229aeb3ebea Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Mon, 15 Nov 2021 13:37:55 +0100 Subject: [PATCH] activate storage: improve error when check_connection dies by making sure the storage ID is part of the error. This can happen for (at least) CIFS, and GlusterFS with local server. Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 68c407a..6112991 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -1099,7 +1099,8 @@ sub activate_storage { activate_storage($cfg, $baseid, $cache); } - if (!$plugin->check_connection($storeid, $scfg)) { + if (! eval { $plugin->check_connection($storeid, $scfg) }) { + die "connection check for storage '$storeid' failed - $@\n" if $@; die "storage '$storeid' is not online\n"; }