mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3301 NPE wile deployVM in kvm Only solidfire type PS is setting/using the capacityIops, This check will fix to return the storage has enough Iops when capacityIops is set to NULL for any PS Storage provider
This commit is contained in:
parent
c48c652aee
commit
1bde0f3fcc
|
|
@ -1490,11 +1490,15 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
|
|||
if (requestedVolumes == null || requestedVolumes.isEmpty() || pool == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only Solidfire type primary storage is using/setting Iops.
|
||||
// This check will fix to return the storage has enough Iops when capacityIops is set to NULL for any PS Storage provider
|
||||
if (pool.getCapacityIops() == null ) {
|
||||
return true;
|
||||
}
|
||||
long currentIops = 0;
|
||||
|
||||
List<VolumeVO> volumesInPool = _volumeDao.findByPoolId(pool.getId(), null);
|
||||
|
||||
|
||||
for (VolumeVO volumeInPool : volumesInPool) {
|
||||
Long minIops = volumeInPool.getMinIops();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue