mirror of https://github.com/apache/cloudstack.git
bug 7899: this seems to be a corner case, and from the logs, there was a vol with no pool id associated with it. Adding a check against it, as this should never happen
status 7899: resolved fixed
This commit is contained in:
parent
5c275827ad
commit
95756802e3
|
|
@ -2652,6 +2652,11 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||
for (VolumeVO vol : vols) {
|
||||
Volume.State state = vol.getState();
|
||||
if (state == Volume.State.Ready) {
|
||||
|
||||
if(vol.getPoolId() == null) {
|
||||
throw new StorageUnavailableException("Volume " + vol + " has no storage pool associated with it, and the pool id associated with it is:", vol.getPoolId());
|
||||
}
|
||||
|
||||
StoragePoolVO pool = _storagePoolDao.findById(vol.getPoolId());
|
||||
if (pool.getRemoved() != null || pool.isInMaintenance()) {
|
||||
if (vol.isRecreatable()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue