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>
This commit is contained in:
Marcus Sorensen 2013-01-18 00:20:34 -07:00 committed by Kishan Kavala
parent 318ff6a774
commit 0306d2f52d
1 changed files with 5 additions and 2 deletions

View File

@ -3149,8 +3149,11 @@ public class LibvirtComputingResource extends ServerResourceBase implements
}
try {
//we use libvirt since we passed a libvirt connection to cleanupDisk
KVMStoragePool pool = _storagePoolMgr.getStoragePool(null, poolUuid);
// we use libvirt as storage adaptor since we passed a libvirt
// connection to cleanupDisk. We pass a storage type that maps
// to libvirt adaptor.
KVMStoragePool pool = _storagePoolMgr.getStoragePool(
StoragePoolType.Filesystem, poolUuid);
if (pool != null) {
pool.delete();
}