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
mon: add RAW USED column to ceph df detail #7087
Conversation
it would be nice to have a test accompanying this patch. |
@jecluis I'll have a try, thanks. |
@jecluis done, but, if the global size is too big, running cost of a long time. |
@yangruifeng couldn't you just put a file worth a few bytes instead? |
@jecluis if the file is too small, %USED is 0. |
Showing the user bytes stored here is a deliberate choice (as is showing hte "max avail" that indicates how many more user bytes can be stored). If we want to show the raw storage consumed for the pool we should put that in a different column... |
@liewegas |
I think just adding RAW USED for each pool (for ceph df detail) would be
sufficient. Your pie chart can add them up and compare to the total raw
(which is the sum of the device sizes). Would that work?
|
@liewegas done. |
@@ -1333,7 +1333,7 @@ inline string percentify(const float& a) { | |||
//void PGMonitor::dump_object_stat_sum(stringstream& ss, Formatter *f, | |||
void PGMonitor::dump_object_stat_sum(TextTable &tbl, Formatter *f, | |||
object_stat_sum_t &sum, uint64_t avail, | |||
bool verbose) const | |||
float raw_used_rate, bool verbose) const | |||
{ | |||
if (f) { | |||
f->dump_int("kb_used", SHIFT_ROUND_UP(sum.num_bytes, 10)); |
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.
it should be included in the json output, too
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.
@liewegas done.
Signed-off-by: Ruifeng Yang <yangruifeng.09209@h3c.com>
mon: add RAW USED column to ceph df detail Reviewed-by: Sage Weil <sage@redhat.com>
So I've only seen it once, but in http://gitbuilder.sepia.ceph.com/gitbuilder-ceph-tarball-trusty-amd64-basic/log.cgi?log=e5585bc2c93199552e3263394e7c11d33e8f3c40 the test this adds is one of two causing make check to fail.
It looks like it can race if stuff is veeeery slow which might be what's going on and I presume there are other solutions (one I see from looking quickly is checking several subsequent map epochs). |
Although I haven't dug into this so it's vaguely possible the prior rbd test failure somehow mucked things up for this test? Seems unlikely though if I understand what this one is doing. |
@gregsfortytwo maybe 'sleep 10' is not enough, change to
|
add a column 'RAW USED' for ceph df detail
Signed-off-by: Ruifeng Yang yangruifeng.09209@h3c.com