Skip to content

Commit 1ed0fe4

Browse files
committed
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.
1 parent 14f3ad5 commit 1ed0fe4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ public KVMStoragePool getStoragePool(StoragePoolType type, String uuid) {
204204
StoragePoolInformation info = _storagePools.get(uuid);
205205
if (info != null) {
206206
pool = createStoragePool(info.name, info.host, info.port, info.path, info.userInfo, info.poolType, info.type);
207+
} else {
208+
throw new CloudRuntimeException("Could not fetch storage pool " + uuid + " from libvirt");
207209
}
208210
}
209211
return pool;

0 commit comments

Comments
 (0)