From: xie xingguo Date: Wed, 31 Jan 2018 02:15:53 +0000 (+0800) Subject: pybind/mgr/balancer: increase bad_steps properly X-Git-Tag: v13.0.2~380^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F20194%2Fhead;p=ceph.git pybind/mgr/balancer: increase bad_steps properly Signed-off-by: xie xingguo --- diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index 0253de924549..cc8245d208f7 100644 --- a/src/pybind/mgr/balancer/module.py +++ b/src/pybind/mgr/balancer/module.py @@ -767,6 +767,7 @@ class Module(MgrModule): next_misplaced, max_misplaced, step) else: if next_pe.score > best_pe.score * 1.0001: + bad_steps += 1 if bad_steps < 5 and random.randint(0, 100) < 70: self.log.debug('Score got worse, taking another step') else: