]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/balancer: fix fudge 28399/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:33:57 +0000 (12:33 +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 eeb2f2b0cb775845bcd437353a747cbf0c7e9115..4bd65fdde6f9b52d4bb929d58b934a290bcb8c6d 100644 (file)
@@ -907,7 +907,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: