Skip to content
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: add inventory card and single stat cards to rgw overview dashboard #52317

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

aaSharma14
Copy link
Contributor

@aaSharma14 aaSharma14 commented Jul 5, 2023

Add Daemons, Zoning, Buckets, Users, Used capacity(capacity used by all the pools in the cluster), Avg object Size(yet to be implemented) cards to the rgw overview dashboard.

Fixes: https://tracker.ceph.com/issues/62258

Screenshot from 2023-07-20 12-34-46

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
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 dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

Copy link
Member

@nizamial09 nizamial09 left a comment

Choose a reason for hiding this comment

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

Thanks @aaSharma14, I haven't tested it locally. Will do it and give more reviews here

@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@aaSharma14 aaSharma14 force-pushed the rgw-overview-dashboard branch 2 times, most recently from b5a7436 to 427d800 Compare July 13, 2023 08:16
Copy link
Member

@nizamial09 nizamial09 left a comment

Choose a reason for hiding this comment

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

few nit picks

total_objects = total_objects + pool['stats']['objects']
total_pool_bytes_used = total_pool_bytes_used + pool['stats']['bytes_used']
Copy link
Member

Choose a reason for hiding this comment

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

we should review if this is correct with rgw folks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I will confirm this with them

@nizamial09
Copy link
Member

unit-test failure

[lint:html    ] 
[lint:html    ] [htmllint] found 0 errors out of 194 files
[lint:html    ] 
[lint:html    ] ERROR in /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html
[lint:html    ] 
[lint:html    ] src/app/core/navigation/navigation/navigation.component.html
[lint:html    ]   274:15  Attributes should vertically align
[lint:html    ] 
[lint:html    ] 
[lint:eslint  ] 
[lint:eslint  ] Linting "ceph-dashboard"...
[lint:eslint  ] 
[lint:eslint  ] All files pass linting.
[lint:eslint  ] 

@cloudbehl
Copy link
Contributor

Check if Avg object size is available from backend. If not we can remove the till or comment it for now.

@aaSharma14 aaSharma14 force-pushed the rgw-overview-dashboard branch 2 times, most recently from 8937b65 to f2ad547 Compare July 17, 2023 07:46
@aaSharma14 aaSharma14 force-pushed the rgw-overview-dashboard branch 2 times, most recently from 1884beb to 3248576 Compare July 17, 2023 08:54
Copy link
Contributor

@avanthakkar avanthakkar left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@epuertat epuertat left a comment

Choose a reason for hiding this comment

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

Given the new landing page (v3) no longer uses cards in this way, why not adopting that approach for depicting this info too:

  • Inventory card: could show the count and status of all the RGW items:
    • Daemons
      • Realms
      • Zonegroups
      • Zones
    • Users
    • Buckets
    • Objects
  • Capacity: a pie-chart like the one used for the main landing page Capacity.

The only piece of info missing from this proposal would be the Avg. Object Size, but my question here is: how's this info actionable? Are there any recommendations about an ideal avg. object size? If there's some threshold/s under/beyond what the avg. object size should be kept, then we could use alerts/health check warnings for that purpose?

image

private rgwBucketService: RgwBucketService,
private rgwUserService: RgwUserService
) {
this.permissions = this.authStorageService.getPermissions();
Copy link
Member

Choose a reason for hiding this comment

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

If I recall it correctly, @nSedrickm created long time ago an Angular directive to avoid having to deal directly with the Permissions (it'd be desirable to have a similar thing for feature toggles, or reuse the cdScope, given both authorization/RBAC and feature-toggles rely on mapping HTML/DOM to specific features/scope), which allowed to simply tag HTML elements with specific permissions/feature toggles.

<div cdScope='"rgw"'>
  ...

Copy link
Member

Choose a reason for hiding this comment

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

@aaSharma14 can you add *cdScope to the first div. Then we can remove the permissions thing.

@aaSharma14
Copy link
Contributor Author

Given the new landing page (v3) no longer uses cards in this way, why not adopting that approach for depicting this info too:

* **Inventory card**: could show the count and status of all the RGW items:
  
  * Daemons
    
    * Realms
    * Zonegroups
    * Zones
  * Users
  * Buckets
  * Objects

* **Capacity**: a pie-chart like the one used for the main landing page Capacity.

The only piece of info missing from this proposal would be the Avg. Object Size, but my question here is: how's this info actionable? Are there any recommendations about an ideal avg. object size? If there's some threshold/s under/beyond what the avg. object size should be kept, then we could use alerts/health check warnings for that purpose?

image

Thanks @epuertat , We initially went with a design similar to the dashboard v3 landing page , a sample design for that approach was something like this -
Screenshot from 2023-06-30 17-45-12

The issues that we identified with this approach were -

  1. As RGW doesn’t have and overall status, so we can’t have status panel.
  2. What details should be shown in the details card was not clear.
  3. Since we just wanted to show the used capacity by rgw and am not sure if we have any Total Capacity in this case, so a pie chart was not fitting here as well
  4. For the inventory card most of the things that we are going to show such as - Realms,Zonegroups,Zones,Users, Buckets, Objects do not have any status property so we could just show their number and the status badge along with it didn't make any sense.

We also have this other PR - #52405, which adds some graphs to the overview page, the overall view looks like this for now -
Screenshot from 2023-07-18 11-58-36

The space left below is to show the multi-site sync status, for which we are planning to use a design similar to this -
Screenshot from 2023-07-18 11-55-26

@cloudbehl
Copy link
Contributor

@epuertat I agree we thought of going with the inventory approach and discussed it with the UX team as well. Things were not fitting well other details we wanted for us with inventory card. Also we had timing constraints we have to choose for the approach and start the implementation. As lot of the data from the cluster dashboard is not present in RGW dashboard. We went with this for now and maybe based on feedback we can adapt. WDYT?

@epuertat
Copy link
Member

Thanks @epuertat , We initially went with a design similar to the dashboard v3 landing page , a sample design for that approach was something like this - Screenshot from 2023-06-30 17-45-12

That's great! I didn't know about this design.

The issues that we identified with this approach were -

  1. As RGW doesn’t have and overall status, so we can’t have status panel.

First of all, there's no need to replicate exactly the Landing Page Dashboard. We can simply pick the widgets that are required.

That said, even if there's no "native" concept of overall status in RGW, we can infer that. What does it mean that everything is OK? E.g.: All services up & running. The idea of having a single indicator of a service status is to provide a single place at which operators should pay attention.

  1. What details should be shown in the details card was not clear.

Same: we can remove if if not required.

  1. Since we just wanted to show the used capacity by rgw and am not sure if we have any Total Capacity in this case, so a pie chart was not fitting here as well

You can still display:

  • total available storage,
  • storage used by RGW,
  • storage used by other interfaces.
  1. For the inventory card most of the things that we are going to show such as - Realms,Zonegroups,Zones,Users, Buckets, Objects do not have any status property so we could just show their number and the status badge along with it didn't make any sense.

It doesn't matter whether they provide "status", what we want to depict is whether everything is ok or not: are all daemons up? are all realms/zonegroups/zones up? ...

We also have this other PR - #52405, which adds some graphs to the overview page, the overall view looks like this for now - Screenshot from 2023-07-18 11-58-36

I already reviewed this one too, and my suggestion is the same: to deliver the existing chart widget.

@epuertat
Copy link
Member

@epuertat I agree we thought of going with the inventory approach and discussed it with the UX team as well. Things were not fitting well other details we wanted for us with inventory card. Also we had timing constraints we have to choose for the approach and start the implementation. As lot of the data from the cluster dashboard is not present in RGW dashboard. We went with this for now and maybe based on feedback we can adapt. WDYT?

As I replied to @aaSharma14 there would be no need to replicate the same exact dashboard, but if the information can fit in an existing widget (like the inventory), I think it's good to leverage that. In any case, this can be implemented incrementally.

@aaSharma14
Copy link
Contributor Author

jenkins test make check

Signed-off-by: Aashish Sharma <aasharma@redhat.com>
@aaSharma14 aaSharma14 changed the title mgr/dashboard: add single stat cards to rgw overview dashboard mgr/dashboard: add inventory card and single stat cards to rgw overview dashboard Jul 20, 2023
@aaSharma14
Copy link
Contributor Author

jenkins test make check

@aaSharma14
Copy link
Contributor Author

jenkins test dashboard cephadm

@cloudbehl
Copy link
Contributor

Few things:

Inventory:

  1. Daemons -> Gateways
  2. if we have 0 objects -> it row gets hidden from inventory

Screenshot from 2023-07-21 16-05-17

@aaSharma14
Copy link
Contributor Author

Few things:

Inventory:

1. Daemons -> Gateways

2. if we have 0 objects -> it row gets hidden from inventory

Screenshot from 2023-07-21 16-05-17

Thanks @cloudbehl , changed Daemons -> Gateways. We are not hiding the object count if its 0..we are hiding it if it is null

@cloudbehl
Copy link
Contributor

Few things:
Inventory:

1. Daemons -> Gateways

2. if we have 0 objects -> it row gets hidden from inventory

Screenshot from 2023-07-21 16-05-17

Thanks @cloudbehl , changed Daemons -> Gateways. We are not hiding the object count if its 0..we are hiding it if it is null

If its null we can assume its 0. As there are not objects that's why it returns null. We should not hide it

Copy link
Member

@nizamial09 nizamial09 left a comment

Choose a reason for hiding this comment

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

The layout is broken for me because of the improper css hacks! As per the design I can see that there's a row and 3 columns, so why not divide the layout like that in html?
Screenshot from 2023-07-25 16-38-37

I tried to fix it. Maybe you can make it more optimizes
Screenshot from 2023-07-25 17-20-10

private rgwBucketService: RgwBucketService,
private rgwUserService: RgwUserService
) {
this.permissions = this.authStorageService.getPermissions();
Copy link
Member

Choose a reason for hiding this comment

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

@aaSharma14 can you add *cdScope to the first div. Then we can remove the permissions thing.

@epuertat
Copy link
Member

The layout is broken for me because of the improper css hacks! As per the design I can see that there's a row and 3 columns, so why not divide the layout like that in html? Screenshot from 2023-07-25 16-38-37

I tried to fix it. Maybe you can make it more optimizes Screenshot from 2023-07-25 17-20-10

What CSS grid/layout are we using there? It looked like we were manually placing components 🤔 ?

overview dashboard

Signed-off-by: Aashish Sharma <aasharma@redhat.com>
@aaSharma14
Copy link
Contributor Author

jenkins test dashboard

@aaSharma14
Copy link
Contributor Author

jenkins test windows

@aaSharma14
Copy link
Contributor Author

jenkins test dashboard

@nizamial09
Copy link
Member

The layout is broken for me because of the improper css hacks! As per the design I can see that there's a row and 3 columns, so why not divide the layout like that in html? Screenshot from 2023-07-25 16-38-37
I tried to fix it. Maybe you can make it more optimizes Screenshot from 2023-07-25 17-20-10

What CSS grid/layout are we using there? It looked like we were manually placing components thinking ?

now its using row-col. 1 row 3 col

Comment on lines +10 to +12
.pb-5 {
padding-bottom: 3.5rem !important;
}
Copy link
Member

Choose a reason for hiding this comment

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

is this necessary? this could break the layout in some views. You can test it out by resizing your window.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is necessary..tested with resizing the window..works fine

Copy link
Member

@nizamial09 nizamial09 left a comment

Choose a reason for hiding this comment

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

mostly looks good! just minor comment on layout!

@aaSharma14 aaSharma14 merged commit d32b6c2 into ceph:main Jul 31, 2023
10 of 13 checks passed
@aaSharma14 aaSharma14 deleted the rgw-overview-dashboard branch July 31, 2023 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
5 participants