[pve-devel] [Patch storage 1/2] Improve error message of shared storage connection check.

Wolfgang Link w.link at proxmox.com
Fri May 18 10:26:20 CEST 2018


Now you see if the storage plugin support it, extra information about the error.
---
 PVE/Storage.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index d733380..b900a4e 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -914,9 +914,8 @@ sub activate_storage {
 	activate_storage($cfg, $baseid, $cache);
     }
 
-    if (!$plugin->check_connection($storeid, $scfg)) {
-	die "storage '$storeid' is not online\n";
-    }
+    my $res = eval { $plugin->check_connection($storeid, $scfg) };
+    die "storage '$storeid' is not online - $res\n" if $res ne 1;
 
     $plugin->activate_storage($storeid, $scfg, $cache);
 
-- 
2.11.0





More information about the pve-devel mailing list