summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/layout.py
diff options
context:
space:
mode:
authorPranav <prprakas@redhat.com>2020-06-02 19:19:52 +0530
committerPranav <prprakas@redhat.com>2020-06-03 11:11:13 +0530
commitee175bd6b40743268a341cc748dca50f58951c4a (patch)
tree64c4239f768005051fa1e2940e9d1d74b69835c4 /glustolibs-gluster/glustolibs/gluster/layout.py
parent2d56ff3360042072de4bd67b0bf950d1f3404d67 (diff)
[Libfix] Fix get_bricks_to_bring_offline_from_replicated_volume
Finding the offline brick limit using ceil returns incorrect value. E.g., For replica count 3, ceil(3/2) returns 2, and the subsequent method uses this value to bring down 2 out of 3 available bricks, resulting in IO and many other failures. Fix: Change ceil to floor. Also change the '/' operator to '//' for py2/3 compatibility Change-Id: I3ee10647bb037a3efe95d1b04e0864cf61e2499e Signed-off-by: Pranav <prprakas@redhat.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/layout.py')
0 files changed, 0 insertions, 0 deletions