Skip to content

Commit 55e8965

Browse files
author
Marcus Sorensen
committed
Summary: Pass StoragePoolType that maps to libvirt in cleanupDisk
Description: When selecting a storage adaptor, cleanupDisk assumes that libvirt is being used. Therefore, we pass a StoragePoolType that maps to libvirt. This is the only place in LibvirtComputingResource where the StoragePoolType can't be pulled from somewhere else. BUG-ID: CLOUDSTACK-1011 Signed-off-by: Marcus Sorensen <marcus@betterservers.com>
1 parent a0bc508 commit 55e8965

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3225,8 +3225,11 @@ private boolean cleanupDisk(Connect conn, DiskDef disk) {
32253225
}
32263226

32273227
try {
3228-
//we use libvirt since we passed a libvirt connection to cleanupDisk
3229-
KVMStoragePool pool = _storagePoolMgr.getStoragePool(null, poolUuid);
3228+
// we use libvirt as storage adaptor since we passed a libvirt
3229+
// connection to cleanupDisk. We pass a storage type that maps
3230+
// to libvirt adaptor.
3231+
KVMStoragePool pool = _storagePoolMgr.getStoragePool(
3232+
StoragePoolType.Filesystem, poolUuid);
32303233
if (pool != null) {
32313234
pool.delete();
32323235
}

0 commit comments

Comments
 (0)