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

osd/Pool: Disallow enabling 'hashpspool' option to a pool without '--yes-i-really-mean-it' #13406

Merged
merged 1 commit into from Feb 16, 2017

Conversation

vumrao
Copy link
Contributor

@vumrao vumrao commented Feb 13, 2017

osd/Pool: Disallow enabling 'hashpspool' option to a pool without '--yes-i-really-mean-it'

Fixes: http://tracker.ceph.com/issues/18468

Signed-off-by: Vikhyat Umrao vumrao@redhat.com

@vumrao
Copy link
Contributor Author

vumrao commented Feb 13, 2017

  • Tested with vstart cluster, looks good:
 $ bin/ceph osd pool set rbd hashpspool 0 
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
Error EPERM: are you SURE?  this will remap all placement groups in this pool, this triggers large data movement, pass --yes-i-really-mean-it if you really do.

$ bin/ceph osd pool set rbd hashpspool 0 --yes-i-really-mean-it
set pool 0 hashpspool to 0

$ bin/ceph osd dump | grep -i rbd                              
pool 0 'rbd' replicated size 3 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 14 stripe_width 0

$ bin/ceph osd pool set rbd hashpspool 1                       
Error EPERM: are you SURE?  this will remap all placement groups in this pool, this triggers large data movement, pass --yes-i-really-mean-it if you really do.

$ bin/ceph osd pool set rbd hashpspool 1 --yes-i-really-mean-it
set pool 0 hashpspool to 1

$ bin/ceph osd dump | grep -i rbd                              
pool 0 'rbd' replicated size 3 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 17 flags hashpspool stripe_width 0

@vumrao
Copy link
Contributor Author

vumrao commented Feb 13, 2017

  • Tested with make check, looks good:
Start   5: cephtool-test-mon.sh
  5/161 Test   #5: cephtool-test-mon.sh ....................   Passed  399.58 sec
/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:1544: test_mon_osd_pool_set:  expect_false ceph osd pool set pool_getset hashpspool 0
/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:31: expect_false:  set -x
/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:32: expect_false:  ceph osd pool set pool_getset hashpspool 0
Error EPERM: are you SURE?  this will remap all placement groups in this pool, this triggers large data movement, pass --yes-i-really-mean-it if you really do.

/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:32: expect_false:  return 0
/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:1545: test_mon_osd_pool_set:  ceph osd pool set pool_getset hashpspool 0 --yes-i-really-mean-it
set pool 27 hashpspool to 0

/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:1547: test_mon_osd_pool_set:  expect_false ceph osd pool set pool_getset hashpspool 1
/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:31: expect_false:  set -x
/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:32: expect_false:  ceph osd pool set pool_getset hashpspool 1
Error EPERM: are you SURE?  this will remap all placement groups in this pool, this triggers large data movement, pass --yes-i-really-mean-it if you really do.

/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:32: expect_false:  return 0
/home/vumrao/Projects/ceph/qa/workunits/cephtool/test.sh:1548: test_mon_osd_pool_set:  ceph osd pool set pool_getset hashpspool 1 --yes-i-really-mean-it
set pool 27 hashpspool to 1

@vumrao
Copy link
Contributor Author

vumrao commented Feb 13, 2017

@athanatos , as discussed sometime back I have sent this PR. Could you please review it. Thank you!

          '--yes-i-really-mean-it'

Fixes: http://tracker.ceph.com/issues/18468

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
@tchaikov tchaikov merged commit f91fa5a into ceph:master Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants