Merge pull request #14415 from ioito/hotfix/qx-ceph-pool-size

fix(host): ceph pool size
This commit is contained in:
Zexi Li
2022-06-07 21:53:27 +08:00
committed by GitHub
+3
View File
@@ -168,6 +168,9 @@ func (self *CephClient) GetCapacity() (*SCapacity, error) {
for _, pool := range stats.Pools {
if pool.Name == self.pool {
result.UsedCapacitySizeKb = int64(pool.Stats.KbUsed)
if pool.Stats.MaxAvail > 0 {
result.CapacitySizeKb = int64(pool.Stats.MaxAvail / 1024)
}
}
}
if result.CapacitySizeKb == 0 {