mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6579: used_bytes column of storage_pool table is no longer used and should be removed
For now correctly setting used_bytes. Also fixed the corresponding simulator code
This commit is contained in:
parent
59bf355919
commit
c9a09f548c
|
|
@ -81,7 +81,7 @@ public class DefaultHostListener implements HypervisorHostListener {
|
|||
}
|
||||
|
||||
StoragePoolVO poolVO = this.primaryStoreDao.findById(poolId);
|
||||
poolVO.setUsedBytes(mspAnswer.getPoolInfo().getAvailableBytes());
|
||||
poolVO.setUsedBytes(mspAnswer.getPoolInfo().getCapacityBytes() - mspAnswer.getPoolInfo().getAvailableBytes());
|
||||
poolVO.setCapacityBytes(mspAnswer.getPoolInfo().getCapacityBytes());
|
||||
primaryStoreDao.update(pool.getId(), poolVO);
|
||||
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa
|
|||
txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
|
||||
txn.close();
|
||||
}
|
||||
return new ModifyStoragePoolAnswer(cmd, storagePool.getCapacity(), 0, new HashMap<String, TemplateProp>());
|
||||
return new ModifyStoragePoolAnswer(cmd, storagePool.getCapacity(), storagePool.getCapacity(), new HashMap<String, TemplateProp>());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -964,7 +964,7 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa
|
|||
}
|
||||
}
|
||||
return new StoragePoolInfo(storagePool.getUuid(), host.getPrivateIpAddress(), storagePool.getMountPoint(), storagePool.getMountPoint(),
|
||||
storagePool.getPoolType(), storagePool.getCapacity(), 0);
|
||||
storagePool.getPoolType(), storagePool.getCapacity(), storagePool.getCapacity());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue