From 0306d2f52dfdc768bbb3b0e4cc520e4790c8198b Mon Sep 17 00:00:00 2001 From: Marcus Sorensen Date: Fri, 18 Jan 2013 00:20:34 -0700 Subject: [PATCH] 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 --- .../hypervisor/kvm/resource/LibvirtComputingResource.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index b52e2d8a0b0..90d3dde6967 100755 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -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(); }