mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4551: Migrating the data volume from NFS to local storage ,underlying disk offering is not changed.
Even though the volume may get migrated from shared to local storage, it is not possible to update the disk offering. The fix is to disallow migration from shared to local store.
This commit is contained in:
parent
e58bef22c1
commit
9fc471dddd
|
|
@ -1309,7 +1309,11 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
|||
throw new InvalidParameterValueException("Failed to find the destination storage pool: " + storagePoolId);
|
||||
}
|
||||
|
||||
if (!_volumeMgr.volumeOnSharedStoragePool(vol)) {
|
||||
if (_volumeMgr.volumeOnSharedStoragePool(vol)) {
|
||||
if (destPool.isLocal()) {
|
||||
throw new InvalidParameterValueException("Migration of volume from shared to local storage pool is not supported");
|
||||
}
|
||||
} else {
|
||||
throw new InvalidParameterValueException("Migration of volume from local storage pool is not supported");
|
||||
}
|
||||
|
||||
|
|
@ -1320,7 +1324,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
|||
try {
|
||||
newVol = _volumeMgr.migrateVolume(vol, destPool);
|
||||
} catch (StorageUnavailableException e) {
|
||||
s_logger.debug("Failed to migrate volume", e);
|
||||
s_logger.debug("Failed to migrate volume", e);
|
||||
}
|
||||
}
|
||||
return newVol;
|
||||
|
|
|
|||
Loading…
Reference in New Issue