Project

General

Profile

Actions

Bug #27000

closed

mgr balancer does not save optimized plan but latest

Added by Stefan Priebe over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
balancer module
Target version:
-
% Done:

100%

Source:
Tags:
Backport:
luminous,mimic
Regression:
No
Severity:
3 - minor
Reviewed:

Description

The current balancer module fails to deepcopy the optimized plan so that best_ws and best_ow are modified later.

Example log which might explain everything:
It fixes the following (mgr debug output):
2018-08-20 22:33:46.078525 7f2fbc3b6700 0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.078574 7f2fbc3b6700 0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.078770 7f2fbc3b6700 0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.156326 7f2fbc3b6700 0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.156374 7f2fbc3b6700 0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.156581 7f2fbc3b6700 0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.233818 7f2fbc3b6700 0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.233868 7f2fbc3b6700 0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.234043 7f2fbc3b6700 0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.313212 7f2fbc3b6700 0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.313714 7f2fbc3b6700 0 mgr[balancer] Score got
worse, trying smaller step 0.000244
2018-08-20 22:33:46.313887 7f2fbc3b6700 0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.391586 7f2fbc3b6700 0 mgr[balancer] Step result
score 0.001152 -> 0.001152, misplacing 0.001141
2018-08-20 22:33:46.393374 7f2fbc3b6700 0 mgr[balancer] Balancing root
default (pools ['cephstor2']) by bytes
2018-08-20 22:33:46.473956 7f2fbc3b6700 0 mgr[balancer] Step result
score 0.001152 -> 0.001180, misplacing 0.000912
2018-08-20 22:33:46.474001 7f2fbc3b6700 0 mgr[balancer] Score got
worse, taking another step
2018-08-20 22:33:46.474046 7f2fbc3b6700 0 mgr[balancer] Success, score
0.001155 -> 0.001152

BUT:
  1. ceph balancer eval myplan
    plan myplan final score 0.001180 (lower is better)

So the final plan does NOT contain the expected optimization. The
deepcopy fixes it.

after the patch applied (see PR on github):
  1. ceph balancer eval myplan
    plan myplan final score 0.001152 (lower is better)

Related issues 2 (0 open2 closed)

Copied to mgr - Backport #32080: luminous: mgr balancer does not save optimized plan but latestResolvedActions
Copied to mgr - Backport #32082: mimic: mgr balancer does not save optimized plan but latestResolvedNathan CutlerActions
Actions #2

Updated by Nathan Cutler over 5 years ago

  • Status changed from New to Fix Under Review
Actions #3

Updated by Kefu Chai over 5 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

Updated by Nathan Cutler over 5 years ago

  • Copied to Backport #32080: luminous: mgr balancer does not save optimized plan but latest added
Actions #6

Updated by Nathan Cutler over 5 years ago

  • Copied to Backport #32082: mimic: mgr balancer does not save optimized plan but latest added
Actions #7

Updated by Nathan Cutler over 5 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF