Skip to content

mgr/dashboard: Improvements in cluster > OSDs - #37506

Merged
LenzGr merged 1 commit into
ceph:masterfrom
rhcs-dashboard:fix-47478-master
Nov 9, 2020
Merged

LenzGr merged 1 commit into
ceph:masterfrom
rhcs-dashboard:fix-47478-master

Conversation

@aaSharma14

@aaSharma14 aaSharma14 commented Oct 1, 2020 •

Copy link
Copy Markdown
Contributor

Made osd-id the first column of the table instead of Host.

Fixes:https://tracker.ceph.com/issues/47478
Signed-off-by:Aashish Sharma [email protected]

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@aaSharma14
aaSharma14 requested a review from a team as a code owner October 1, 2020 11:40
@alfonsomthd alfonsomthd added dashboard skip-teuthology For PRs whose changes do not have an effect on QA runs/changes are not being tested in Teuthology labels Oct 1, 2020
@alfonsomthd
alfonsomthd requested review from a team and tspmelo October 1, 2020 14:49
@alfonsomthd alfonsomthd changed the title mgr/dashboard:Improvements in cluster > OSDs mgr/dashboard: Improvements in cluster > OSDs Oct 1, 2020
@alfonsomthd

Copy link
Copy Markdown
Contributor

jenkins test dashboard

@nizamial09

Copy link
Copy Markdown
Member

@aaSharma14 Could you please add the screenshot of the change?

@aaSharma14
aaSharma14 requested a review from a team October 13, 2020 09:13
@aaSharma14

Copy link
Copy Markdown
Contributor Author

@aaSharma14 Could you please add the screenshot of the change?

Added the screenshot.Thanks :)

@aaSharma14

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@aaSharma14
aaSharma14 force-pushed the fix-47478-master branch 3 times, most recently from 3b9af3d to b16d2a2 Compare October 15, 2020 11:37
@aaSharma14

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@alfonsomthd

alfonsomthd commented Oct 15, 2020 •

Copy link
Copy Markdown
Contributor

@aaSharma14 I've tested it and does not work as expected: OSD device count = 0 when it should be 2:

Screenshot from 2020-10-15 18-20-14

Here you can see that the osd has 2 devices:
Screenshot from 2020-10-15 18-20-38

A fix suggestion for your consideration:

            metadata = mgr.get_metadata('osd', osd_spec)
            osd['device_count'] = 0
            if metadata and 'devices' in metadata:
                osd['device_count'] = len(metadata['devices'].split(','))

Also, IMHO "Device Count" column needs a little bit more of width (or maybe the text can be shortened).

@aaSharma14

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@aaSharma14

Copy link
Copy Markdown
Contributor Author

@aaSharma14 I've tested it and does not work as expected: OSD device count = 0 when it should be 2:

Screenshot from 2020-10-15 18-20-14

Here you can see that the osd has 2 devices:
Screenshot from 2020-10-15 18-20-38

A fix suggestion for your consideration:

            metadata = mgr.get_metadata('osd', osd_spec)
            osd['device_count'] = 0
            if metadata and 'devices' in metadata:
                osd['device_count'] = len(metadata['devices'].split(','))

Also, IMHO "Device Count" column needs a little bit more of width (or maybe the text can be shortened).

Thanks @alfonsomthd , I have made some modifications and updated the PR, Can you please do a retest and confirm if its working correctly now.!

@alfonsomthd alfonsomthd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally: LGTM

@epuertat epuertat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a big concern with the newly added get_metadata method. This will probably happen to other list() methods too, but we should be extremely careful before adding more bottlenecks to the dashboard code.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please measure how long this list() method takes with: 1, 2, 4, 8 and 16 OSDs. You can easily do that in vstart (OSD=N env var setting). It's also be interesting to see how the CPU reacts during this request (you'll probably better launch this from REST via curl CLI).

@epuertat epuertat Oct 27, 2020 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the data that @aaSharma14 obtained from running this with OSD count {1,2,4,6,8,16}, as expected, it grows linearly (not many samples but enough to confirm it). Despite not resulting in huge numbers when extrapolated to OSD=100 or even 1000 (35 ms or 350 ms), the number of API calls (O(N)) might cause issues with the processing queues at ceph-mgr.

image

Additionally, this mgr.get_metadata() call is only used for retrieving the number of devices of each OSD, which is a rarely changing data.

Solutions:

  • To find a single ceph-mgr API call returning this info aggregated for all OSDs.
  • Or to introduce pagination, or at least only retrieving separately the currently displayed OSD information, and the device count (only for the OSDs displayed). As a side effect of this, the Device Count column couldn't be sortable/searchable anymore (we don't have all OSD's device count to sort that or search).

@epuertat epuertat Oct 29, 2020 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR meant to fix 2 issues reported in the linked tracker (@pcuzner please check this):

  1. The table provides a list of OSDs and yet the first column isn’t the osd id it’s the host
    1.1. Put the osd id first
  2. Each osd can span multiple devices (and does for spinners), but to understand how many devices support an OSD you have to go to the properties of each OSD..
    2.1. Provide the count of devices an OSD uses on each row to provide a quick way for the configuration to be checked.

The 1st one is tackled, while the second 2 is "feasible" but would impact scalability: OSD endpoint is now O(1) (as long as mgr.get('osd_map') is O(1) which is probably an 'over-assumption' given CPython interfacing overhead) and for retrieving this information, it's necessary to poll mgr.metadata() for every OSD, which is O(n) for a periodically polled endpoint...

My suggestion is to keep the current behaviour: leave the device count in the OSD Details sub-table, and only poll for that information when a user wants to expand details for that OSD. Additionally, the device count is 'low-entropy' data (will never change once an OSD is created, and most, if no all, OSDs will have the same device count).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @epuertat . I have removed the device count feature as discussed and this PR is now only intended for :
The table provides a list of OSDs and yet the first column isn’t the osd id it’s the host
1.1. Put the osd id first

@aaSharma14
aaSharma14 requested a review from pcuzner October 30, 2020 07:27
@tspmelo
tspmelo requested a review from a team October 30, 2020 12:52
@aaSharma14
aaSharma14 dismissed stale reviews from epuertat and votdev November 5, 2020 09:32

Changes Addressed

@LenzGr
LenzGr merged commit a839fab into ceph:master Nov 9, 2020
bk201 added a commit to bk201/ceph that referenced this pull request Nov 12, 2020
- Adapt the OSD ID column change in this PR:
  ceph#37506
- Turn off Cypress retries because it makes the failure log misleading.

Fixes: https://tracker.ceph.com/issues/48209
Signed-off-by: Kiefer Chang <[email protected]>
jmolmo pushed a commit to jmolmo/ceph that referenced this pull request Dec 14, 2020
- Adapt the OSD ID column change in this PR:
  ceph#37506
- Turn off Cypress retries because it makes the failure log misleading.

Fixes: https://tracker.ceph.com/issues/48209
Signed-off-by: Kiefer Chang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard skip-teuthology For PRs whose changes do not have an effect on QA runs/changes are not being tested in Teuthology

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

8 participants