CLOUDSTACK-9668 : disksizeallocated of PrimaryStorage is different from the total size of a volume

update capacity if current allocated is different from used bytes in DB.
This commit is contained in:
Sudhansu 2016-12-21 14:07:47 +05:30 committed by Rohit Yadav
parent d216345af7
commit 970746c6d6
1 changed files with 1 additions and 1 deletions

View File

@ -1005,7 +1005,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
_capacityDao.persist(capacity);
} else {
CapacityVO capacity = capacities.get(0);
if (capacity.getTotalCapacity() != totalOverProvCapacity || allocated != 0L || capacity.getCapacityState() != capacityState) {
if (capacity.getTotalCapacity() != totalOverProvCapacity || allocated != capacity.getUsedCapacity() || capacity.getCapacityState() != capacityState) {
capacity.setTotalCapacity(totalOverProvCapacity);
capacity.setUsedCapacity(allocated);
capacity.setCapacityState(capacityState);