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: OSDMonitor: fix the check error of pg creating #10916
Conversation
@jordan41177 the change looks good to me, could you add a simple test in |
@@ -1514,6 +1514,9 @@ function test_mon_osd_pool_set() | |||
wait_for_clean | |||
ceph osd pool set $TEST_POOL_GETSET pgp_num 10 | |||
|
|||
ceph osd pool set $TEST_POOL_GETSET pg_num 106 |
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.
could you squash this commit into the previous one? or add a prefix ("qa/workunits/cephtool/test.sh: ") to the title of the commit message of this commit?
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.
Okay @tchaikov , I will fix it after a week...(for a trip). Sorry for late.
@tchaikov |
@jordan41177 could you put "Fixes: http://tracker.ceph.com/issues/17169" in your commit message? right before your "Signed-off-by" line. |
The variable 'pgs_per_osd' set value from 'new_pgs' divided by 'expected_osds', and its type is integer. So it would remove the decimal point and get smaller value. This would have problem in some situations, for exmaple: The limitation of pg creating for one OSD is '32'. There have 3 OSDs and I want to increase pgs for a pool. It should be the limitation for creating new pgs up to '96(32 * 3)' at once. Now, I create '98' pgs for a pool. In original code, '98' would be divided by 'expected_osds' and get the floating value '32....' Because of the type which is integer, the 'pgs_per_osd' would be set to 32. Then the value won't bigger than the limitation and get the wrong result. Signed-off-by: DesmondS <desmond.s@inwinstack.com> Fixes: http://tracker.ceph.com/issues/17169
lgtm |
@tchaikov @hjwsm1989 |
tested at http://pulpito.ceph.com/kchai-2016-10-09_12:58:06-rados-wip-kefu-testing---basic-mira/ failed tests are tracked at |
Fix: http://tracker.ceph.com/issues/17169
Signed-off-by: DesmondS desmond.s@inwinstack.com