mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 8471: Check whether secondary storage URL is null when copying volumes across storage pools.
This commit is contained in:
parent
99b5f7279d
commit
2efdc9d62b
@ -1286,14 +1286,16 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
||||
HostPodVO destPoolPod = _podDao.findById(destPoolPodId);
|
||||
StoragePoolVO destPool = findStoragePool(dskCh, destPoolDataCenter, destPoolPod, destPoolClusterId, null, null, null,
|
||||
new HashSet<StoragePool>());
|
||||
String secondaryStorageURL = getSecondaryStorageURL(volume.getDataCenterId());
|
||||
String secondaryStorageVolumePath = null;
|
||||
|
||||
if (destPool == null) {
|
||||
throw new CloudRuntimeException("Failed to find a storage pool with enough capacity to move the volume to.");
|
||||
}if (secondaryStorageURL == null){
|
||||
throw new CloudRuntimeException("Failed to find secondary storage.");
|
||||
}
|
||||
|
||||
StoragePoolVO srcPool = _storagePoolDao.findById(volume.getPoolId());
|
||||
String secondaryStorageURL = getSecondaryStorageURL(volume.getDataCenterId());
|
||||
String secondaryStorageVolumePath = null;
|
||||
StoragePoolVO srcPool = _storagePoolDao.findById(volume.getPoolId());
|
||||
|
||||
// Copy the volume from the source storage pool to secondary storage
|
||||
CopyVolumeCommand cvCmd = new CopyVolumeCommand(volume.getId(), volume.getPath(), srcPool, secondaryStorageURL, true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user