mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
kvm: Throw a proper exception when pool could not be fetched from libvirt
Otherwise NULL is returned and leads to a NPE further up the chain.
This commit is contained in:
parent
14f3ad55ec
commit
1ed0fe4ee7
@ -204,6 +204,8 @@ public class KVMStoragePoolManager {
|
||||
StoragePoolInformation info = _storagePools.get(uuid);
|
||||
if (info != null) {
|
||||
pool = createStoragePool(info.name, info.host, info.port, info.path, info.userInfo, info.poolType, info.type);
|
||||
} else {
|
||||
throw new CloudRuntimeException("Could not fetch storage pool " + uuid + " from libvirt");
|
||||
}
|
||||
}
|
||||
return pool;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user