]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: balancer: deepcopy best plan - otherwise we get latest 23682/head
authorStefan Priebe <s.priebe@profihost.ag>
Wed, 22 Aug 2018 06:33:04 +0000 (08:33 +0200)
committerStefan Priebe <s.priebe@profihost.ag>
Wed, 22 Aug 2018 07:00:54 +0000 (09:00 +0200)
Fixes: http://tracker.ceph.com/issues/27000
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
src/pybind/mgr/balancer/module.py

index b8cbb511ab393592a5dac1af88f2a47c19988ce9..ca090516c99df09e46a9415ff8ec5f284db1bc0c 100644 (file)
@@ -881,8 +881,8 @@ class Module(MgrModule):
                 else:
                     bad_steps = 0
                     best_pe = next_pe
-                    best_ws = next_ws
-                    best_ow = next_ow
+                    best_ws = copy.deepcopy(next_ws)
+                    best_ow = copy.deepcopy(next_ow)
                     if best_pe.score == 0:
                         break
             left -= 1