]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/balancer: fix fudge 28279/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>
Wed, 5 Jun 2019 04:29:33 +0000 (12:29 +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>
(cherry picked from commit 8f46a351f1fa6f921b373aed4038efc0898a8a44)

src/pybind/mgr/balancer/module.py

index 80692929c2b071d5608b738dadb51e8d0a3d1e0e..7868cd2fbc174e3f48265944961c768d27962cb2 100644 (file)
@@ -1125,7 +1125,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: