Repository navigation
mon: show CRUSH rule name in osd pool ls detail - #68886
Conversation
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
13 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
jenkins test pr |
anthonyeleven
left a comment
There was a problem hiding this comment.
I’m not qualified to review the code but this looks awesome
|
@ceph/core mind taking a look when you get a chance? Adds a --show-rule-names flag to osd pool ls detail (text shows the CRUSH rule by name, JSON gets an additive crush_rule_name sibling alongside the int, so balancer/pg_autoscaler stay safe). Anthony D'Atri's tracker enhancement. Only red check is windows tests, which builds clean on both Linux arches here. |
|
@rzarzynski mind taking a look when you get a chance, or pointing me to the right person? (the @ceph/core mention above doesn't notify since I'm not in the org) |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
Jenkins retest windows |
|
@rzarzynski ? @adamemerson ? @ljflores ? |
adamemerson
left a comment
There was a problem hiding this comment.
I'm not from core, but it looks like a decent, minimal fix.
Needs core QA.
|
Core however is ignoring this. |
|
This PR has been added to wip-bharath11-testing-20260819.231216-main. |
ronen-fr
left a comment
There was a problem hiding this comment.
LGTM - but missing a documentation change in ceph.rst (line 1221)
:-) not anymore. |
ceph osd pool ls detail prints crush_rule with the numeric rule id, so mapping that id back to a name needs a separate ceph osd crush rule dump and a search through its output. Add a --show-rule-names flag that, with detail, renders the CRUSH rule by name in the text output and adds a sibling crush_rule_name string to the JSON output. The JSON crush_rule field stays an int and the default output is unchanged, so existing scripts that parse the integer keep working (in particular the in-tree balancer and pg_autoscaler that pin to int). When the referenced rule no longer exists, text falls back to the numeric id and JSON omits the crush_rule_name field, so the output is never misleading. Tracker: https://tracker.ceph.com/issues/76401 Signed-off-by: Lumir Sliva <[email protected]> Reported-by: Anthony D'Atri Signed-off-by: Lumir Sliva <[email protected]>
ef56a6b to
fa5809d
Compare
Done. Thanks for the review. |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
Summary
ceph osd pool ls detailshowscrush_rule <id>for every pool, butthere's no straightforward way to map that id to a rule name from the
same command.
ceph osd crush rule dump <id>doesn't accept an id,so users have to dump every rule and search.
This adds a
--show-rule-namesflag, paired withdetail, that:crush_ruleas an int (no schema change)and adds a sibling
crush_rule_namestring field.Before:
After (text):
After (JSON):
The JSON shape is additive on purpose. The in-tree
balancerandpg_autoscalermgr modules pincrush_ruleto an int (e.g.crush.get_rule_by_id(pool['crush_rule'])), so flipping the field'stype under any flag would break them. The opt-in sibling field is
safe for any consumer that already reads the int.
If the referenced rule no longer exists in CRUSH, the text falls back
to the numeric id and the JSON omits
crush_rule_name, so the outputis never misleading.
Verified on vstart with a default rule, a named replicated rule, and
pools pointing at each.
Checklist
Tracker: https://tracker.ceph.com/issues/76401