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

mon: show the pool quota info on ceph df detail command #7094

Merged
merged 1 commit into from Mar 26, 2016

Conversation

songbaisen
Copy link

Mon: show the pool quota info on ceph df detail command

Fixes: #14216
signed-off-by: song baisen song.baisen@zte.com.cn

@songbaisen songbaisen changed the title Show the pool quota info on ceph df detial command Show the pool quota info on ceph df detail command Jan 4, 2016
@songbaisen
Copy link
Author

@jecluis Thanks for your good advice.I will try to write the test tomorrow.

@songbaisen
Copy link
Author

@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);
Copy link
Member

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

Copy link
Author

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

@liewegas
Copy link
Member

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.

@songbaisen
Copy link
Author

@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);

Copy link
Contributor

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.

@songbaisen
Copy link
Author

@tchaikov Thank you! Fix it.It is amazing that the space cannot see in vim,only use the git show --color can show.

@songbaisen songbaisen changed the title Show the pool quota info on ceph df detail command Mon:show the pool quota info on ceph df detail command Jan 16, 2016
@songbaisen
Copy link
Author

@liewegas @jecluis Hi,I hava upload the test.Please review it.Thank you! @_@

@theanalyst
Copy link
Member

I'm not sure whether the wording MAX BYTES conveys the full information that these many bytes are allowed as per quota, maybe Quota MAX BYTES or MAX BYTES allowed might be more informative, albeit a bit more verbose.

@theanalyst
Copy link
Member

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);
Copy link
Member

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?

@liewegas
Copy link
Member

QUOTA BYTES ?

@theanalyst
Copy link
Member

QUOTA BYTES ?

Yeah shorter and simpler :)

@songbaisen
Copy link
Author

@theanalyst Thanks for your reply.I have changed the coder.Please review it.

Fixes: ceph#14216
Signed-off-by: song baisen <song.baisen@zte.com.cn>
@theanalyst
Copy link
Member

LGTM

@liewegas liewegas changed the title Mon:show the pool quota info on ceph df detail command mon: show the pool quota info on ceph df detail command Mar 26, 2016
@liewegas liewegas merged commit 7702781 into ceph:master Mar 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants