[pve-devel] [Patch container] Improve error message of shared storage connection check.

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


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

diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
index 1364b8d..e380bd8 100644
--- a/src/PVE/LXC/Migrate.pm
+++ b/src/PVE/LXC/Migrate.pm
@@ -77,8 +77,9 @@ sub prepare {
 	if ($scfg->{shared}) {
 	    # PVE::Storage::activate_storage checks this for non-shared storages
 	    my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
-	    warn "Used shared storage '$storage' is not online on source node!\n"
-		if !$plugin->check_connection($storage, $scfg);
+	    my $res = eval { $plugin->check_connection($storage, $scfg) };
+	    warn "Used shared storage '$storage' is not online on source node! - $res\n"
+		if $res ne 1;
 	} else {
 	    # only activate if not shared
 	    push @$need_activate, $volid;
-- 
2.11.0




More information about the pve-devel mailing list