Skip to content

mgr/balancer: make crush-compat mode work - #17983

Merged
liewegas merged 19 commits into
ceph:masterfrom
liewegas:wip-balancer
Nov 1, 2017
Merged

liewegas merged 19 commits into
ceph:masterfrom
liewegas:wip-balancer

Conversation

@liewegas

@liewegas liewegas commented Sep 26, 2017 •

Copy link
Copy Markdown
Member

This is starting to work!

  • better throttling on max_misplaced
  • handle 'out' osds
  • transparently phase out old osd_weights, if present

My only concern here is that when it breaks (throws an exception in serve()) we don't get a run failure because we don't have mgr health alerts for crashed modules yet. I don't think that should prevent us from merging, though. I've done some spot checks and it appears to be doing fine.

@liewegas

Copy link
Copy Markdown
Member Author

@jcsp: got


2017-10-30T04:04:18.658 INFO:tasks.ceph.mgr.y.smithi054.stderr:*** Caught signal (Segmentation fault) **
2017-10-30T04:04:18.658 INFO:tasks.ceph.mgr.y.smithi054.stderr: in thread 7f1e50da5700 thread_name:mgr_module_path
2017-10-30T04:04:18.659 INFO:tasks.ceph.mgr.y.smithi054.stderr: ceph version 13.0.0-2610-ge3b3929 (e3b39291fcfea8709351d83c73699f058f89c7ad) mimic (dev)
2017-10-30T04:04:18.659 INFO:tasks.ceph.mgr.y.smithi054.stderr: 1: (()+0x3b7399) [0x7f1e62304399]
2017-10-30T04:04:18.659 INFO:tasks.ceph.mgr.y.smithi054.stderr: 2: (()+0x10330) [0x7f1e609b2330]
2017-10-30T04:04:18.659 INFO:tasks.ceph.mgr.y.smithi054.stderr: 3: (()+0x1bd9e8) [0x7f1e619819e8]
2017-10-30T04:04:18.659 INFO:tasks.ceph.mgr.y.smithi054.stderr: 4: (()+0x1bf1ef) [0x7f1e619831ef]
2017-10-30T04:04:18.659 INFO:tasks.ceph.mgr.y.smithi054.stderr: 5: (()+0x15ecd7) [0x7f1e61922cd7]
2017-10-30T04:04:18.659 INFO:tasks.ceph.mgr.y.smithi054.stderr: 6: (_PyObject_GC_Malloc()+0xcb) [0x7f1e6192390b]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 7: (_PyObject_GC_New()+0xd) [0x7f1e619239ad]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 8: (PyDict_New()+0x74) [0x7f1e6192ac44]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 9: (_PyDict_NewPresized()+0xc) [0x7f1e6192afec]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 10: (PyEval_EvalFrameEx()+0x287f) [0x7f1e6190183f]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 11: (PyEval_EvalCodeEx()+0x80d) [0x7f1e61905c3d]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 12: (PyEval_EvalFrameEx()+0x48d8) [0x7f1e61903898]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 13: (PyEval_EvalCodeEx()+0x80d) [0x7f1e61905c3d]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 14: (PyEval_EvalFrameEx()+0x48d8) [0x7f1e61903898]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 15: (PyEval_EvalCodeEx()+0x80d) [0x7f1e61905c3d]
2017-10-30T04:04:18.660 INFO:tasks.ceph.mgr.y.smithi054.stderr: 16: (PyEval_EvalFrameEx()+0x48d8) [0x7f1e61903898]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 17: (PyEval_EvalFrameEx()+0x4b59) [0x7f1e61903b19]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 18: (PyEval_EvalCodeEx()+0x80d) [0x7f1e61905c3d]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 19: (()+0x141dd0) [0x7f1e61905dd0]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 20: (PyObject_Call()+0x43) [0x7f1e618da0a3]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 21: (()+0xbad6d) [0x7f1e6187ed6d]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 22: (PyObject_Call()+0x43) [0x7f1e618da0a3]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 23: (PyObject_CallMethod()+0x10b) [0x7f1e618901db]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 24: (MgrPyModule::serve()+0x49) [0x7f1e6220e469]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 25: (ServeThread::entry()+0x5f) [0x7f1e622012cf]
2017-10-30T04:04:18.661 INFO:tasks.ceph.mgr.y.smithi054.stderr: 26: (()+0x8184) [0x7f1e609aa184]
2017-10-30T04:04:18.662 INFO:tasks.ceph.mgr.y.smithi054.stderr: 27: (clone()+0x6d) [0x7f1e5fa9037d]
2017-10-30T04:04:18.662 INFO:tasks.ceph.mgr.y.smithi054.stderr:2017-10-30 04:04:18.664 7f1e50da5700 -1 *** Caught signal (Segmentation fault) **

on /a/sage-2017-10-30_02:29:13-rados-wip-sage-testing-2017-10-29-1619-distro-basic-smithi/1789687
I thought the ref vs gil thing was in master, but maybe not?

- it does multiple iterations, like the upmap optimizer.
- it decreases the step size if it isn't improving, in the hope
that it is overshooting the minimum
- debug output is cleaned up a bit (the info level should be
genuinely useful)

Signed-off-by: Sage Weil <[email protected]>
Take smaller steps if we overshoot max_misplaced.

Signed-off-by: Sage Weil <[email protected]>
..and fix the 'worse' threshold (we're just working around floating
point imprecision; 1.01 was too coarse).

Signed-off-by: Sage Weil <[email protected]>
Phase out the osd_weight values as we optimize the crush compat
weight set.  Allow a small regression in overall score if it means
we are taking a step to remove the osd_weight value.

Fix the 'osd reweightn' invocation.

Signed-off-by: Sage Weil <[email protected]>
We are smart enough to back off if we misplace too much.

Signed-off-by: Sage Weil <[email protected]>
To avoid getting stuck in a local minima, take a few additional
steps if our score drops and see if it gets better.

Signed-off-by: Sage Weil <[email protected]>
That should be ~1 PG or less on average; no real sense it taking a
step smaller than that!

Signed-off-by: Sage Weil <[email protected]>
The verbose output is helpful for debugging and understanding what is
being measured, but most of the time all that you care about is the score.

Signed-off-by: Sage Weil <[email protected]>
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

all commits in this PR are signed

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Docs: failed with errors

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

submodules for project are unmodified

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

make check succeeded

1 similar comment
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

make check succeeded

@jcsp

jcsp commented Nov 1, 2017

Copy link
Copy Markdown
Contributor

@liewegas no, the fix for MonCommandCompletion wasn't in master yet (was in the big mgr refactor branch we just merged)

@liewegas

liewegas commented Nov 1, 2017

Copy link
Copy Markdown
Member Author

jenkins render docs

@liewegas
liewegas merged commit aa828be into ceph:master Nov 1, 2017
@xiexingguo

Copy link
Copy Markdown
Member

Great!
Can't wait to try it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants