Skip to content

Commit 425b377

Browse files
authored
Merge pull request #41 from gluster/vol_size_issue
Fix Volume size calculation
2 parents 3c99381 + 7e4824c commit 425b377

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

glustercli/cli/parsers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,16 @@ def _update_volume_utilization(volumes):
9595
effective_capacity_used = brick["size_used"]
9696

9797
if effective_capacity_total == 0 or \
98-
brick["size_total"] <= effective_capacity_total:
98+
(brick["size_total"] <= effective_capacity_total and
99+
brick["size_total"] > 0):
99100
effective_capacity_total = brick["size_total"]
100101

101102
if brick["inodes_used"] >= effective_inodes_used:
102103
effective_inodes_used = brick["inodes_used"]
103104

104105
if effective_inodes_total == 0 or \
105-
brick["inodes_total"] <= effective_inodes_total:
106+
(brick["inodes_total"] <= effective_inodes_total and
107+
brick["inodes_total"] > 0):
106108
effective_inodes_total = brick["inodes_total"]
107109

108110
if subvol["type"] == TYPE_DISPERSE:

0 commit comments

Comments
 (0)