Skip to content
Snippets Groups Projects
Commit f66242d7 authored by ioito's avatar ioito
Browse files

fix(host): ceph pool size

parent 1a7ad830
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,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 {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment