]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/balancer: increase bad_steps properly 20194/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 31 Jan 2018 02:15:53 +0000 (10:15 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 31 Jan 2018 02:15:53 +0000 (10:15 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/pybind/mgr/balancer/module.py

index 0253de924549061d3c24a2b6836d17032cb2739e..cc8245d208f74c2e7ac772362265aeba6c6ff1eb 100644 (file)
@@ -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: