Project

General

Profile

Actions

Bug #50971

closed

mgr/dashboard: crushmap tree doesn't display crush type other than root

Added by Avan Thakkar almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Component - Cluster
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Dashboard crushmap tree view should match the output of `ceph osd tree`. Currently it just shows one tree with a single parent node
i.e root=default.

Steps to Reproduce:
1. Deploy a ceph cluster
2. Move the OSD's out of ‘default’ CRUSH root to a new one.
eg :
/bin/ceph osd crush move osd.7 host=host1-9 datacenter=site1
/bin/ceph osd crush move osd.4 host=host2-8 datacenter=site2

3. login to dashboard. Navigate to Cluster -> CRUSH map.
4. Observe that only OSD's and hosts under ‘default’ CRUSH root is displayed. It is different from the ceph osd tree.


Files

Screenshot from 2021-05-26 16-08-11.png (42.4 KB) Screenshot from 2021-05-26 16-08-11.png osd_map_tree Avan Thakkar, 05/26/2021 10:45 AM
Screenshot from 2021-05-26 16-16-04.png (42.4 KB) Screenshot from 2021-05-26 16-16-04.png ceph osd tree (with multiple trees) Avan Thakkar, 05/26/2021 10:46 AM
Screenshot from 2021-05-26 16-53-50.png (68.8 KB) Screenshot from 2021-05-26 16-53-50.png fetching root nodes Avan Thakkar, 05/26/2021 11:25 AM

Related issues 1 (0 open1 closed)

Copied to Dashboard - Backport #51343: pacific: mgr/dashboard: crushmap tree doesn't display crush type other than rootResolvedAvan ThakkarActions
Actions #1

Updated by Avan Thakkar almost 3 years ago

The issue here is dashboard frontend code just constructs the tree with just root as a parent node (by using type==root), but as mentioned in the description there can be other crush types (and their corresponding trees) as a parent node too. But I think the info we get from `mgr.get('osd_map_tree')['nodes']` is not enough to construct multiple trees as one missing info we need here is parent node for each tree or atleast some info about parents of nodes in the tree.
So I've 2 suggestions for this here:
1) Maybe we can get additional info about parent nodes for different trees from `mgr.get('osd_map_tree')['nodes']` , with maybe some boolean value if possible.
2) Not touching the CLI at all: just implement a function in backend/frontend which will iterate through each children of a node(if it has any) and mark their `isParent[children.id]=true` and while constructing the tree in frontend we can use this info to fetch out different parent nodes. But this will involve a lot of data processing and also may slow frontend as it iterates through each children of every node.

I need more info from RADOS team to check if there's already a way to fetch some info for parent of a node.
@Neha . Ojha @Josh Jones Durgin @Kefu Chai Chai Can you provide some info here?

Actions #2

Updated by Avan Thakkar almost 3 years ago

  • Tracker changed from Bug to Tasks

The issue here is dashboard frontend code just constructs the tree with just root as a parent node (by using type==root), but as mentioned in the description there can be other crush types (and their corresponding trees) as a parent node too. But I think the info we get from `mgr.get('osd_map_tree')['nodes']` is not enough to construct multiple trees as one missing info we need here is parent node for each tree or atleast some info about parents of nodes in the tree.
So I've 2 suggestions for this here:
1) Maybe we can get additional info about parent nodes for different trees from `mgr.get('osd_map_tree')['nodes']` , with maybe some boolean value if possible.
2) Not touching the CLI at all: just implement a function in backend/frontend which will iterate through each children of a node(if it has any) and mark their `isParent[children.id]=true` and while constructing the tree in frontend we can use this info to fetch out different parent nodes. But this will involve a lot of data processing and also may slow frontend as it iterates through each children of every node.

I need more info from RADOS team to check if there's already a way to fetch some info for parent of a node.
@Neha . Ojha @Josh Jones Durgin Can you provide some info here?

Actions #3

Updated by Avan Thakkar almost 3 years ago

  • Category changed from i18n to General
Actions #4

Updated by Kefu Chai almost 3 years ago

Avan, please use @mgr.get('osd_map_crush') for accessing the crush tree. or use mgr.get_crush().

Updated by Avan Thakkar almost 3 years ago

Kefu Chai wrote:

Avan, please use @mgr.get('osd_map_crush') for accessing the crush tree. or use mgr.get_crush().

I just checked it, but I think it's not useful enough to build crush trees for dashboard. In fact I would say mgr.get('osd_map_tree') is giving more relevant info than mgr.get('osd_map_crush') for constructing tree. `ceph osd tree` outputs the perfect crush tree structure which is what we want to follow and show it in the dashboard too. I've attached an img which shows output we're getting from osd_map_tree. It has children list, type id,etc..but this information is not enough to construct multiple trees (I've attached an similar `ceph osd tree` output), because we need to know parent nodes of each tree in order to construct multiple trees, but I don't see any info exposed from osd_map for parent of a node/s.
Please let me know if I'm missing something here.

Actions #6

Updated by Avan Thakkar almost 3 years ago

@Kefu Chai Chai Just to confirm we are on the same page, this is what we agreed on, right? (ss attached)

Actions #7

Updated by Kefu Chai almost 3 years ago

  • Pull request ID set to 41552

https://github.com/ceph/ceph/pull/41552 is created to add the find_root() method.

Actions #8

Updated by Kefu Chai almost 3 years ago

  • Pull request ID deleted (41552)
Actions #9

Updated by Kefu Chai almost 3 years ago

  • Status changed from Need More Info to In Progress
Actions #10

Updated by Kefu Chai almost 3 years ago

  • Category deleted (i18n)
Actions #11

Updated by Ernesto Puerta almost 3 years ago

  • Status changed from In Progress to Resolved
  • Pull request ID set to 41758
Actions #12

Updated by Ernesto Puerta almost 3 years ago

  • Tracker changed from Tasks to Bug
  • Category set to Component - Cluster
  • Status changed from Resolved to Pending Backport
  • Target version set to v16.2.5
  • Source set to Development
  • Backport set to pacific
  • Regression set to No
  • Severity set to 3 - minor
Actions #13

Updated by Backport Bot almost 3 years ago

  • Copied to Backport #51343: pacific: mgr/dashboard: crushmap tree doesn't display crush type other than root added
Actions #14

Updated by Ernesto Puerta almost 3 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF