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

OSDMonitor: check mon_max_pool_pg_num when set pool pg_num #16511

Merged
merged 1 commit into from Jul 25, 2017

Conversation

Projects
None yet
3 participants
@c744402859
Copy link
Contributor

c744402859 commented Jul 23, 2017

Check the mon_max_pool_pg_num when creating pools, but did not

check in the the modification. So we can create a pool and then

modify pg_num exceeds the mon_max_pool_pg_num limit.

By following these steps can verify this problem

step 1: set mon_max_pool_pg_num = 65536

step 2: ceph osd pool create testpool 65536 65536

step 3: ceph osd pool set testpool pg_num 65537

Signed-off-by: chenhg c744402859@gmail.com

ss << "'pg_num' must be greater than 0 and less than or equal to "
<< g_conf->mon_max_pool_pg_num
<< " (you may adjust 'mon max pool pg num' for higher values)";
return -ERANGE;

This comment has been minimized.

Copy link
@xiexingguo

xiexingguo Jul 24, 2017

Member

This looks right. Can you fix the alignment here and below?

This comment has been minimized.

Copy link
@c744402859

c744402859 Jul 24, 2017

Author Contributor

Thanks. I have already modified the alignment

@@ -6008,6 +6008,12 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
return -EEXIST;
return 0;
}
if (n > (unsigned)g_conf->mon_max_pool_pg_num) {
ss << "'pg_num' must be greater than 0 and less than or equal to "
<< g_conf->mon_max_pool_pg_num

This comment has been minimized.

Copy link
@xiexingguo

xiexingguo Jul 24, 2017

Member

Can you make sure these lines are << aligned too?

Also please squash these three commits into a single one.
https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst might be helpful.

This comment has been minimized.

Copy link
@c744402859

c744402859 Jul 24, 2017

Author Contributor

Thanks for your help.

OSDMonitor: check mon_max_pool_pg_num when set pool pg_num
Check the mon_max_pool_pg_num when creating pools, but did not

check in the the modification. So we can create a pool and then

modify pg_num exceeds the mon_max_pool_pg_num limit.

By following these steps can verify this problem

step 1: set  mon_max_pool_pg_num = 65536

step 2: ceph osd pool create testpool 65536 65536

step 3: ceph osd pool set testpool pg_num 65537

Signed-off-by: chenhg <c744402859@gmail.com>

@yuriw yuriw merged commit 65185cf into ceph:master Jul 25, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.