Skip to content

luminous: bulk backport of ceph-mgr improvements - #18675

Merged
liewegas merged 107 commits into
ceph:luminousfrom
jcsp:wip-luminous-mgr
Nov 2, 2017
Merged

liewegas merged 107 commits into
ceph:luminousfrom
jcsp:wip-luminous-mgr

Conversation

@jcsp

@jcsp jcsp commented Nov 1, 2017

Copy link
Copy Markdown
Contributor

The motivation here is to provide the latest ceph-mgr additions to luminous users:

  • fleshed out prometheus module
  • influxdb module
  • balancer module (latest balancer module bits to be backported separately or added here once mgr/balancer: make crush-compat mode work #17983 merges in master)
  • standby mode for modules
  • "mgr services" command to see the addresses of module-provided services

This PR includes the relevant commits along with the things they depend on and some bug fixes that are coming along for the ride. This will overlap with some backport tracker tickets, but we can clean those up afterwards. It's essential to do this in a big PR because of the subtle merge conflicts that otherwise exist between the changes included here: the order in which things are cherry-picked into this PR is somewhat magic.

liewegas and others added 24 commits November 1, 2017 23:03
This is summary info, same as what's in 'ceph status'.

Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit 85b5b80)
Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit bfb9286)
Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit 2ef0051)
Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit 39c42dd)
- wake up every minute
- back off when unknown, inactive, degraded
- throttle against misplaced ratio
- apply some optimization step
  - initially implement 'upmap' only

Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit 0d9685c)
Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit 028a66d)
…ts too

Allow us to specify a root node in the hierarchy instead of a rule.
This way we can use it in conjunction with find_takes().

Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit 69454e0)
Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit ef140de)
These let us identify distinct CRUSH hierarchies that rules distribute
data over, and create relative weight maps for the OSDs they map to.

Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit 3b8a276)
Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit a928bf6)
Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit d5e5c68)
Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit 7a00e02)
* score lies in [0, 1), 0 being perfect distribution
* use shifted and scaled cdf of normal distribution
  to prioritize highly over-weighted device.
* consider only over-weighted devices to calculate score

Signed-off-by: Spandan Kumar Sahu <[email protected]>
(cherry picked from commit c09308c)
(with upmap at least)

Signed-off-by: Sage Weil <[email protected]>
(cherry picked from commit ef1a3be)
...so that we can control the level of load
we're putting on ceph-mgr with perf counters.  Don't collect
anything below PRIO_USEFUL by default.

Signed-off-by: John Spray <[email protected]>
(cherry picked from commit bdc775f)
ceph-mgr has missed out on the `config set` command
that the other daemons got recently: add it here
and hook it all up to the stats period and threshold
settings.

Signed-off-by: John Spray <[email protected]>
(cherry picked from commit 057b73d)
Various things here were dangerously operating
outside locks.

Additionally switch to a RWLock because this lock
will be relatively read-hot when it's taken every time
a MMgrReport is handled, to look up the DaemonState
for the sender.

Fixes: http://tracker.ceph.com/issues/21158
Signed-off-by: John Spray <[email protected]>
(cherry picked from commit 806f108)
The DaemonStateIndex locking is sufficient to make all
the report processing safe: holding DaemonServer::lock
through all ms_dispatch was unnecessarily serializing
dispatch.

Signed-off-by: John Spray <[email protected]>
(cherry picked from commit 64af9d3)
Signed-off-by: John Spray <[email protected]>
(cherry picked from commit d209157)
Because we don't (yet) properly prevent multiple sessions
from daemons reporting the same name (e.g. rgws), storing
it in the DaemonPerfCounters meant that one daemon's report
was referring to another daemon's set of reported types.

This should always have been a property of the session.

The behaviour will still be ugly when multiple daemons
are using the same name (stomping on each other's stats/statsu)
but it shouldn't crash.

Fixes: http://tracker.ceph.com/issues/21197
Signed-off-by: John Spray <[email protected]>
(cherry picked from commit dc415f1)
Signed-off-by: My Do <[email protected]>
(cherry picked from commit 68ae26c)
Signed-off-by: My Do <[email protected]>
(cherry picked from commit e345fe3)
Both follow prometheus best practices. While : is a legal metric
character, "Exposed metrics should not contain colons, these are for
users to use when aggregating."

Signed-off-by: Jan Fajerski <[email protected]>
(cherry picked from commit 177afcc)
… now

Signed-off-by: Jan Fajerski <[email protected]>
(cherry picked from commit 49b3ff8)
John Spray added 3 commits November 1, 2017 23:03
Otherwise, when someone wants to see what's possible
to do with `mgr module enable` they have to trawl
through the whole mgr map dump.

Signed-off-by: John Spray <[email protected]>
(cherry picked from commit 5861c4c)
This was converted to options.cc only, but we cannot
backport another commit that removes this legacy health
reporting code, so this commit updates the legacy health
reporting code for the options.cc style config opt.

Signed-off-by: John Spray <[email protected]>
This was getting the definition some other way in master,
but in luminous we need to include the backport14 header.

Signed-off-by: John Spray <[email protected]>
@jcsp
jcsp force-pushed the wip-luminous-mgr branch from 42a3a9b to d4fcb97 Compare November 1, 2017 23:03
I inadvertently broke this with the latest change
to the module ls output.

Signed-off-by: John Spray <[email protected]>
(cherry picked from commit 4fb3025)
@jcsp

jcsp commented Nov 2, 2017

Copy link
Copy Markdown
Contributor Author

This inherited some master failures from #18685, I've pulled that fix into this branch.

@liewegas
liewegas merged commit 240edcf into ceph:luminous Nov 2, 2017
@smithfarm

Copy link
Copy Markdown
Contributor

@jcsp Thanks, John. This will reduce cherry-pick conflicts for sure, at least in the short term.

@jcsp
jcsp deleted the wip-luminous-mgr branch November 7, 2017 12:01
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.

7 participants