New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mgr/dashboard: crushmap tree doesn't display crush type other than root #41758
mgr/dashboard: crushmap tree doesn't display crush type other than root #41758
Conversation
Fixes: https://tracker.ceph.com/issues/50971 Signed-off-by: Avan Thakkar <athakkar@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I think we should do 2 things:
- Rename the front-end component (or at least the visible title) to Crush Tree/Structure or Location (the CRUSH map itself contains other data)
- Provide a back-end endpoint that generates the information ready to be used directly by the UI, and not processed in any way in the client-side.
| return { | ||
| 'names': [r['rule_name'] for r in mgr.get('osd_map_crush')['rules']], | ||
| 'nodes': mgr.get('osd_map_tree')['nodes'] | ||
| 'nodes': mgr.get('osd_map_tree')['nodes'], | ||
| 'roots': crush.find_roots() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to keep this crush_rule endpoint as a legacy one ok, but I'd suggest creating a new endpoint called crush_tree and expose the information as it's going to be consumed by the front-end: that is, in tree-like form (what we display in the Dashboard is not the CRUSH map or CRUSH rules, but the CRUSH tree).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd have more sense to create a separate endpoint if it can somehow returh the tree-like form as u mentioned, but that can't be the case as I pointed out here #41758 (comment) . The info provided by backend still remains the same i.e. nodes and roots of different trees. And on the other hand if we create a endpoint crush_tree with this same info we would need to introduce the same in frontend (creating crushTree service kinda duplicate of crushRule, etc..). Also on the other hand it's just we aren't exposing more info about crush map in UI, but that can be done as future improvement (tracker already exist https://tracker.ceph.com/issues/47483) and we can for now just keep the name of component and the endpoint as it is?
Yes, we may expose a separate endpoint
Well the thing is anyway we need to construct tree in the frontend from the info provided by the backend : root nodes, children,etc.. And most of the data processing is for the same, about constructing the tree from top to bottom. So whatever changes we make for the endpoint I don't think we can improve much the data processing in frontend. But will look more if possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @avanthakkar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
working fine on my machine 👍
Fixes: https://tracker.ceph.com/issues/50971
Signed-off-by: Avan Thakkar athakkar@redhat.com
Dashboard resembles o/p of
ceph osd tree:# ceph osd treeChecklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox