mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-5857: for some reasons, delete secondary pool failed during copy template from secondary storage to primary storage, but the volume is already copied to primary storage, we didn't clean up the volume on primary storage, then all the following copy the same template to primary storage failed, as we are always using the same uuid when creating a new volume, libvirt complaining that the volume already exists.
Current fix is ignoring "the delete secondary storage error".
This commit is contained in:
parent
d4c7574f12
commit
d1d855fef4
@ -242,8 +242,12 @@ public class KVMStorageProcessor implements StorageProcessor {
|
||||
} catch (CloudRuntimeException e) {
|
||||
return new CopyCmdAnswer(e.toString());
|
||||
} finally {
|
||||
if (secondaryPool != null) {
|
||||
secondaryPool.delete();
|
||||
try {
|
||||
if (secondaryPool != null) {
|
||||
secondaryPool.delete();
|
||||
}
|
||||
} catch(Exception e) {
|
||||
s_logger.debug("Failed to clean up secondary storage", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -609,7 +609,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
|
||||
}
|
||||
s_logger.error("failed in umount retry");
|
||||
}
|
||||
throw new CloudRuntimeException(e.toString());
|
||||
throw new CloudRuntimeException(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -249,7 +249,12 @@ public class LibvirtStoragePool implements KVMStoragePool {
|
||||
|
||||
@Override
|
||||
public boolean delete() {
|
||||
return this._storageAdaptor.deleteStoragePool(this);
|
||||
try {
|
||||
return this._storageAdaptor.deleteStoragePool(this);
|
||||
} catch (Exception e) {
|
||||
s_logger.debug("Failed to delete storage pool", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user