Skip to content

Commit aa725cb

Browse files
committed
Update 11773: skip capacity update for storpool
1 parent f2d41f8 commit aa725cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server/src/main/java/com/cloud/storage/StorageManagerImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,8 +2699,10 @@ public void updateStoragePoolHostVOAndBytes(StoragePool pool, long hostId, Modif
26992699
}
27002700

27012701
StoragePoolVO poolVO = _storagePoolDao.findById(pool.getId());
2702-
poolVO.setUsedBytes(mspAnswer.getPoolInfo().getCapacityBytes() - mspAnswer.getPoolInfo().getAvailableBytes());
2703-
poolVO.setCapacityBytes(mspAnswer.getPoolInfo().getCapacityBytes());
2702+
if (!Storage.StoragePoolType.StorPool.equals(poolVO.getPoolType())) {
2703+
poolVO.setUsedBytes(mspAnswer.getPoolInfo().getCapacityBytes() - mspAnswer.getPoolInfo().getAvailableBytes());
2704+
poolVO.setCapacityBytes(mspAnswer.getPoolInfo().getCapacityBytes());
2705+
}
27042706

27052707
_storagePoolDao.update(pool.getId(), poolVO);
27062708
}

0 commit comments

Comments
 (0)