mirror of https://github.com/apache/cloudstack.git
Prevent double counting storage pools (#5398)
* Prevent double counting storage pools Currenly, getStoragePoolUsedStats fetch all pools undepended if a pool have a parent. Therefore as soon as a datastore cluster is used, the cluster and the storages it contains are calculated together The change fetch all storages without cluster and all datastore cluster * Update server/src/main/java/com/cloud/storage/StorageManagerImpl.java Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com> Co-authored-by: DK101010 <dirk.klahre@itelligence.de> Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
f6073052aa
commit
dc17cf4f39
|
|
@ -2080,6 +2080,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
|
|||
if (poolId != null) {
|
||||
sc.addAnd("hostOrPoolId", SearchCriteria.Op.EQ, poolId);
|
||||
}
|
||||
sc.addAnd("parent", SearchCriteria.Op.EQ, 0L);
|
||||
if (poolId != null) {
|
||||
pools.add(_storagePoolDao.findById(poolId));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue