]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/balancer: fix fudge 27994/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 7 May 2019 09:10:21 +0000 (17:10 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 7 May 2019 09:10:21 +0000 (17:10 +0800)
next_* simply record some intermediate results when balancer tries
to find something to optimize, whereas best_* are used for the
final outputs.

Fix by comparing origin_ow with best_ow when determining if we
should use a valid fudge value.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/pybind/mgr/balancer/module.py

index db8ea3c57c9d27dc6d5d0ff614fb5e4d20646a1d..b7217e47f187d2cf9c09c2a66b2a645eac88c1c6 100644 (file)
@@ -1116,7 +1116,7 @@ class Module(MgrModule):
 
         # allow a small regression if we are phasing out osd weights
         fudge = 0
-        if next_ow != orig_osd_weight:
+        if best_ow != orig_osd_weight:
             fudge = .001
 
         if best_pe.score < pe.score + fudge: