5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-02-03 13:47:16 +03:00

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 <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-11-15 13:37:55 +01:00 committed by Thomas Lamprecht
parent 18bf2e59da
commit 38431808b4

View File

@ -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";
}