mirror of https://github.com/apache/cloudstack.git
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:
parent
d216345af7
commit
970746c6d6
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue