]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/balancer: increase bad_steps properly
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>
Thu, 8 Feb 2018 05:39:24 +0000 (13:39 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit 47d1eb35e746cca2fb394f1905171c6e53a2d8e6)

src/pybind/mgr/balancer/module.py

index f21805ba0e17cde787d87f5ca4636e3db041cefe..3d48cbba69468d9326cc86200a76006c464c5c6f 100644 (file)
@@ -785,6 +785,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: