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: show the pool quota info on ceph df detail command #7094
Conversation
c0b34aa
to
1175e22
Compare
52f9366
to
775825f
Compare
@jecluis Thanks for your good advice.I will try to write the test tomorrow. |
04676cc
to
9eef346
Compare
@jecluis Hi!Could you tell me where i add this test.And which language should i use shell or python? |
if (pool->quota_max_bytes == 0) | ||
tbl << "N/A"; | ||
else | ||
tbl << si_t( pool->quota_max_bytes); |
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.
nit: pls remove extra whitespace
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.
Thanks very much for your careful check.But it look like a bug of github. My code is not have the extra whitespace.It can see in the below pull request. And i use vim to modify the code.
https://github.com/songbaisen/ceph/blob/wipdf/src/mon/PGMonitor.cc
one of the bash scripts in ceph.git/src/test/ would be fine. if there isn't something already testing quotas, you can add it to one of the mon test scripts. |
@liewegas Thanks very much to you!I will add this test later.Now I study your crush code, It is really a huge work for me. |
tbl << "N/A"; | ||
else | ||
tbl << si_t(pool->quota_max_objects); | ||
|
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.
@songbaisen probably the spaces are here. and you can use
git show --color
to see the trailing spaces.
@tchaikov Thank you! Fix it.It is amazing that the space cannot see in vim,only use the git show --color can show. |
4225d56
to
9fd6e8d
Compare
8bb0196
to
5cb461e
Compare
I'm not sure whether the wording |
We should probably add the same info in the json output as well EDIT. clarify that we need to update the json output also |
tbl << "N/A"; | ||
else | ||
tbl << si_t(pool->quota_max_bytes); | ||
} | ||
} | ||
dump_object_stat_sum(tbl, f, stat.stats.sum, avail, verbose); |
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.
Since we are modifying the table output, it makes sense to add these to the json output as well?
QUOTA BYTES ? |
Yeah shorter and simpler :) |
@theanalyst Thanks for your reply.I have changed the coder.Please review it. |
aa2293b
to
0746470
Compare
Fixes: ceph#14216 Signed-off-by: song baisen <song.baisen@zte.com.cn>
LGTM |
Mon: show the pool quota info on ceph df detail command
Fixes: #14216
signed-off-by: song baisen song.baisen@zte.com.cn