From: xie xingguo Date: Tue, 7 May 2019 09:10:21 +0000 (+0800) Subject: mgr/balancer: fix fudge X-Git-Tag: v14.2.2~61^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F28279%2Fhead;p=ceph.git mgr/balancer: fix fudge 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 (cherry picked from commit 8f46a351f1fa6f921b373aed4038efc0898a8a44) --- diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index 80692929c2b0..7868cd2fbc17 100644 --- a/src/pybind/mgr/balancer/module.py +++ b/src/pybind/mgr/balancer/module.py @@ -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: