mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3372: CapacityManager does not count destroyed volumes when deploy VMs
This commit is contained in:
parent
313177a51e
commit
893eb37724
|
|
@ -499,8 +499,8 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
|
|||
@Override
|
||||
public long getAllocatedPoolCapacity(StoragePoolVO pool, VMTemplateVO templateForVmCreation){
|
||||
|
||||
// Get size for all the volumes
|
||||
Pair<Long, Long> sizes = _volumeDao.getCountAndTotalByPool(pool.getId());
|
||||
// Get size for all the non-destroyed volumes
|
||||
Pair<Long, Long> sizes = _volumeDao.getNonDestroyedCountAndTotalByPool(pool.getId());
|
||||
long totalAllocatedSize = sizes.second() + sizes.first() * _extraBytesPerVolume;
|
||||
|
||||
// Get size for VM Snapshots
|
||||
|
|
|
|||
Loading…
Reference in New Issue