Project

General

Profile

Feature #6822

BE: Dash: Return list of pools and quota sizes

Added by Neil Levine almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Backend (REST API)
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:

6822-example.txt View - Example output from /cluster/<id>/pool resource (1.2 KB) John Spray, 11/25/2013 04:59 AM

6822-example-2.txt View (1.64 KB) John Spray, 11/26/2013 09:25 AM

History

#1 Updated by Neil Levine almost 8 years ago

For the dashboard, we want to add a new widget which shows the total number of pools available as the headline. For the context, we want to show if any pools are reaching their quota. The API probably needs to return a list of all pool names, actual usage and max quota size.

#2 Updated by Neil Levine almost 8 years ago

  • Status changed from New to 12

#3 Updated by John Spray almost 8 years ago

  • Category set to Backend (REST API)

For pool space usage, 1.x code is already getting the 'df' info in _populate_space, just not storing the per-pool stuff, so that's easy.

quota_max_bytes is in the OSD map, so that's there too, although by default quotas are not set so nothing should rely too much on it being present.

#4 Updated by John Spray almost 8 years ago

  • Target version set to v1.1rc2

#5 Updated by John Spray almost 8 years ago

  • Assignee set to John Spray

#6 Updated by John Spray almost 8 years ago

  • Status changed from 12 to In Progress

#7 Updated by John Spray almost 8 years ago

#8 Updated by Yan-Fa Li almost 8 years ago

Could we make the fields a little more uniform?

e.g.

quota_max_bytes maps to bytes_used

Could we have

quota_max_bytes -> used_bytes
quota_max_objects -> used_objects

This helps when processing and makes the JSON a bit easier to read.
I'm also ok with make bytes the prefix

bytes_used
bytes_quota_max
objects_used
objects_quota_max

This has some readability benefits as the fields.

Other than that, this looks good +1

#9 Updated by Yan-Fa Li almost 8 years ago

If it's cheap to add, I would also love pg_states counts per pool. At some point, we'd like to add PG Map views for each pool using a dropdown. You can kind of see it in the mock, where we show a per pool view.

#10 Updated by John Spray almost 8 years ago

Let's leave per-pool PG counts for now: I'd rather implement forward-looking stuff in the 2.0 codebase, as much of this 1.x API stuff will get thrown away in the spring.

#11 Updated by John Spray almost 8 years ago

Created #6898 + targeted for v2.0 to make sure I don't forget we would like to provide the per-pool PG info.

#12 Updated by John Spray almost 8 years ago

The attribute names: the quota_max_[objects_bytes] are from the osd map, so I like to keep those the same, while the others are from the 'df' output. So changing to used_bytes and used_objects works fine - done.

#13 Updated by Ian Colle almost 8 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF