mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
if libvirt fails to attach disks, call disconnectPhysicalDisk to clean up
This commit is contained in:
parent
e2b13a344a
commit
4fcd0b1a1f
@ -971,6 +971,7 @@ public class KVMStorageProcessor implements StorageProcessor {
|
||||
return new AttachAnswer(disk);
|
||||
} catch (LibvirtException e) {
|
||||
s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to " + e.toString());
|
||||
storagePoolMgr.disconnectPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), vol.getPath());
|
||||
return new AttachAnswer(e.toString());
|
||||
} catch (InternalErrorException e) {
|
||||
s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to " + e.toString());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user