mirror of https://github.com/apache/cloudstack.git
bug CS-16380: Check if storage pool changed during migration. Migration should fail only when the assigned pool is not same as existing storage pool
status CS-16380: resolved fixed reviewed-by: Abhi
This commit is contained in:
parent
cb5386391c
commit
ec0c35269a
|
|
@ -2794,11 +2794,16 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||
}
|
||||
recreateVols.add(vol);
|
||||
} else {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Volume " + vol + " is not recreatable! Cannot recreate on storagepool: " + assignedPool);
|
||||
if (assignedPool.getId() != vol.getPoolId()) {
|
||||
// copy volume usecase - not yet developed.
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Volume " + vol + " is not recreatable! Cannot recreate on storagepool: " + assignedPool);
|
||||
}
|
||||
throw new StorageUnavailableException("Volume is not recreatable, Unable to create " + vol, Volume.class, vol.getId());
|
||||
} else {
|
||||
StoragePoolVO pool = _storagePoolDao.findById(vol.getPoolId());
|
||||
vm.addDisk(new VolumeTO(vol, pool));
|
||||
}
|
||||
throw new StorageUnavailableException("Volume is not recreatable, Unable to create " + vol, Volume.class, vol.getId());
|
||||
// copy volume usecase - not yet developed.
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue