mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-3445: Observing the system alerts "unallocated Local Storage is low in cluster" when Primary storage is Local Storage
Available bytes was getting stored in the used bytes property of local storage pools. As a result of this, for newly added local pools Cloudstack thinks that there is no space available and generated alerts.
This commit is contained in:
parent
47acf671d5
commit
396a13dd0b
@ -203,8 +203,8 @@ public class StoragePoolVO implements StoragePool {
|
||||
return capacityBytes;
|
||||
}
|
||||
|
||||
public void setUsedBytes(long available) {
|
||||
usedBytes = available;
|
||||
public void setUsedBytes(long usedBytes) {
|
||||
this.usedBytes = usedBytes;
|
||||
}
|
||||
|
||||
public void setCapacityBytes(long capacityBytes) {
|
||||
|
||||
@ -113,7 +113,7 @@ public class PrimaryDataStoreHelper {
|
||||
|
||||
StoragePoolVO pool = this.dataStoreDao.findById(store.getId());
|
||||
pool.setScope(scope.getScopeType());
|
||||
pool.setUsedBytes(existingInfo.getAvailableBytes());
|
||||
pool.setUsedBytes(existingInfo.getCapacityBytes() - existingInfo.getAvailableBytes());
|
||||
pool.setCapacityBytes(existingInfo.getCapacityBytes());
|
||||
pool.setStatus(StoragePoolStatus.Up);
|
||||
this.dataStoreDao.update(pool.getId(), pool);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user