From 2c26fb0fe188e3ff6a62a2b3cd6444df0d9302ae Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 11 Aug 2018 14:14:05 -0500 Subject: [PATCH] rados: drop mkpool, rmpool commands - mkpool and rmpool users should use the normal cli/mon commands Signed-off-by: Sage Weil --- PendingReleaseNotes | 4 ++ doc/dev/blkin.rst | 2 +- doc/dev/quick_guide.rst | 2 +- doc/man/8/rados.rst | 6 -- doc/radosgw/multisite.rst | 30 +++++----- qa/standalone/scrub/osd-scrub-repair.sh | 6 +- .../special/ceph_objectstore_tool.py | 2 +- qa/tasks/ceph_manager.py | 5 +- qa/tasks/manypools.py | 4 +- qa/workunits/fs/misc/mkpool_layout_vxattrs.sh | 4 +- qa/workunits/mon/rbd_snaps_ops.sh | 4 +- qa/workunits/rados/test_rados_timeouts.sh | 4 +- qa/workunits/rados/test_rados_tool.sh | 26 ++++---- qa/workunits/rados/test_tmap_to_omap.sh | 4 +- qa/workunits/rbd/cli_generic.sh | 8 +-- src/bash_completion/rados | 2 +- src/test/memuse/test_pool_memuse.sh | 2 +- src/test/memuse/test_pool_memuse_tcmalloc.sh | 2 +- src/test/test_pools.sh | 4 +- src/test/test_split.sh | 2 +- src/tools/rados/rados.cc | 60 ------------------- 21 files changed, 59 insertions(+), 124 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 4905a766bc7..788f1ca3a9d 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -40,6 +40,9 @@ (good) purpose: the OSD should always check heartbeats on both the public and cluster networks. +* The ``rados`` tool's ``mkpool`` and ``rmpool`` commands have been + removed because they are redundant; please use the ``ceph osd pool + create`` and ``ceph osd pool rm`` commands instead. @@ -52,3 +55,4 @@ Upgrading from Luminous * During the upgrade from luminous to nautilus, it will not be possible to create a new OSD using a luminous ceph-osd daemon after the monitors have been upgraded to nautilus. + diff --git a/doc/dev/blkin.rst b/doc/dev/blkin.rst index 5e283b766b3..59712483605 100644 --- a/doc/dev/blkin.rst +++ b/doc/dev/blkin.rst @@ -111,7 +111,7 @@ You may want to check that ceph is up.:: Now put something in usin rados, check that it made it, get it back, and remove it.:: - ./rados mkpool test-blkin + ./ceph osd pool create test-blkin 8 ./rados put test-object-1 ./vstart.sh --pool=test-blkin ./rados -p test-blkin ls ./ceph osd map test-blkin test-object-1 diff --git a/doc/dev/quick_guide.rst b/doc/dev/quick_guide.rst index d9c6a533b51..7bda55f22c3 100644 --- a/doc/dev/quick_guide.rst +++ b/doc/dev/quick_guide.rst @@ -66,7 +66,7 @@ Make a pool and run some benchmarks against it: .. code:: - $ bin/rados mkpool mypool + $ bin/ceph osd pool create mypool 8 $ bin/rados -p mypool bench 10 write -b 123 Place a file into the new pool: diff --git a/doc/man/8/rados.rst b/doc/man/8/rados.rst index 0a37767fc4b..4357fbf5454 100644 --- a/doc/man/8/rados.rst +++ b/doc/man/8/rados.rst @@ -72,12 +72,6 @@ Global commands Show utilization statistics, including disk usage (bytes) and object counts, over the entire system and broken down by pool. -:command:`mkpool` *foo* - Create a pool with name foo. - -:command:`rmpool` *foo* [ *foo* --yes-i-really-really-mean-it ] - Delete the pool foo (and all its data). - :command:`list-inconsistent-pg` *pool* List inconsistent PGs in given pool. diff --git a/doc/radosgw/multisite.rst b/doc/radosgw/multisite.rst index 0c2c44258b1..d47f7a6c612 100644 --- a/doc/radosgw/multisite.rst +++ b/doc/radosgw/multisite.rst @@ -239,11 +239,11 @@ they exist. :: - # rados rmpool default.rgw.control default.rgw.control --yes-i-really-really-mean-it - # rados rmpool default.rgw.data.root default.rgw.data.root --yes-i-really-really-mean-it - # rados rmpool default.rgw.gc default.rgw.gc --yes-i-really-really-mean-it - # rados rmpool default.rgw.log default.rgw.log --yes-i-really-really-mean-it - # rados rmpool default.rgw.users.uid default.rgw.users.uid --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.control default.rgw.control --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.data.root default.rgw.data.root --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.gc default.rgw.gc --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.log default.rgw.log --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.users.uid default.rgw.users.uid --yes-i-really-really-mean-it Create a System User -------------------- @@ -419,11 +419,11 @@ needed. :: - # rados rmpool default.rgw.control default.rgw.control --yes-i-really-really-mean-it - # rados rmpool default.rgw.data.root default.rgw.data.root --yes-i-really-really-mean-it - # rados rmpool default.rgw.gc default.rgw.gc --yes-i-really-really-mean-it - # rados rmpool default.rgw.log default.rgw.log --yes-i-really-really-mean-it - # rados rmpool default.rgw.users.uid default.rgw.users.uid --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.control default.rgw.control --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.data.root default.rgw.data.root --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.gc default.rgw.gc --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.log default.rgw.log --yes-i-really-really-mean-it + # ceph osd pool rm default.rgw.users.uid default.rgw.users.uid --yes-i-really-really-mean-it Update the Ceph Configuration File ---------------------------------- @@ -1310,11 +1310,11 @@ with the deleted zone’s name. :: - # rados rmpool .rgw.control .rgw.control --yes-i-really-really-mean-it - # rados rmpool .rgw.data.root .rgw.data.root --yes-i-really-really-mean-it - # rados rmpool .rgw.gc .rgw.gc --yes-i-really-really-mean-it - # rados rmpool .rgw.log .rgw.log --yes-i-really-really-mean-it - # rados rmpool .rgw.users.uid .rgw.users.uid --yes-i-really-really-mean-it + # ceph osd pool rm .rgw.control .rgw.control --yes-i-really-really-mean-it + # ceph osd pool rm .rgw.data.root .rgw.data.root --yes-i-really-really-mean-it + # ceph osd pool rm .rgw.gc .rgw.gc --yes-i-really-really-mean-it + # ceph osd pool rm .rgw.log .rgw.log --yes-i-really-really-mean-it + # ceph osd pool rm .rgw.users.uid .rgw.users.uid --yes-i-really-really-mean-it Modify a Zone ~~~~~~~~~~~~~ diff --git a/qa/standalone/scrub/osd-scrub-repair.sh b/qa/standalone/scrub/osd-scrub-repair.sh index 352a71c6fd0..a2a1333eb48 100755 --- a/qa/standalone/scrub/osd-scrub-repair.sh +++ b/qa/standalone/scrub/osd-scrub-repair.sh @@ -3006,7 +3006,7 @@ EOF return 1 fi - rados rmpool $poolname $poolname --yes-i-really-really-mean-it + ceph osd pool rm $poolname $poolname --yes-i-really-really-mean-it teardown $dir || return 1 } @@ -5166,7 +5166,7 @@ EOF jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1 fi - rados rmpool $poolname $poolname --yes-i-really-really-mean-it + ceph osd pool rm $poolname $poolname --yes-i-really-really-mean-it teardown $dir || return 1 } @@ -5551,7 +5551,7 @@ EOF return 1 fi - rados rmpool $poolname $poolname --yes-i-really-really-mean-it + ceph osd pool rm $poolname $poolname --yes-i-really-really-mean-it teardown $dir || return 1 } diff --git a/qa/standalone/special/ceph_objectstore_tool.py b/qa/standalone/special/ceph_objectstore_tool.py index 8507913acd9..d764c9fa58b 100755 --- a/qa/standalone/special/ceph_objectstore_tool.py +++ b/qa/standalone/special/ceph_objectstore_tool.py @@ -1803,7 +1803,7 @@ def main(argv): if EXP_ERRORS == 0: NEWPOOL = "rados-import-pool" - cmd = "{path}/rados mkpool {pool}".format(pool=NEWPOOL, path=CEPH_BIN) + cmd = "{path}/ceph osd pool create {pool} 8".format(pool=NEWPOOL, path=CEPH_BIN) logging.debug(cmd) ret = call(cmd, shell=True, stdout=nullfd, stderr=nullfd) diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index e507782f136..855124567e9 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -1657,9 +1657,8 @@ class CephManager: assert pool_name in self.pools self.log("removing pool_name %s" % (pool_name,)) del self.pools[pool_name] - self.do_rados(self.controller, - ['rmpool', pool_name, pool_name, - "--yes-i-really-really-mean-it"]) + self.raw_cluster_cmd('osd', 'pool', 'rm', pool_name, pool_name, + "--yes-i-really-really-mean-it") def get_pool(self): """ diff --git a/qa/tasks/manypools.py b/qa/tasks/manypools.py index 1ddcba5c8a9..d8577c03ff6 100644 --- a/qa/tasks/manypools.py +++ b/qa/tasks/manypools.py @@ -54,9 +54,9 @@ def task(ctx, config): log.info('creating pool{num} on {role}'.format(num=poolnum, role=role_)) proc = remote.run( args=[ - 'rados', + 'ceph', '--name', role_, - 'mkpool', 'pool{num}'.format(num=poolnum), '-1', + 'osd', 'pool', 'create', 'pool{num}'.format(num=poolnum), '8', run.Raw('&&'), 'rados', '--name', role_, diff --git a/qa/workunits/fs/misc/mkpool_layout_vxattrs.sh b/qa/workunits/fs/misc/mkpool_layout_vxattrs.sh index 80c0f7bfea1..6b2fecbc01e 100755 --- a/qa/workunits/fs/misc/mkpool_layout_vxattrs.sh +++ b/qa/workunits/fs/misc/mkpool_layout_vxattrs.sh @@ -3,13 +3,13 @@ set -e touch foo.$$ -rados mkpool foo.$$ +ceph osd pool create foo.$$ 8 ceph fs add_data_pool cephfs foo.$$ setfattr -n ceph.file.layout.pool -v foo.$$ foo.$$ # cleanup rm foo.$$ ceph fs rm_data_pool cephfs foo.$$ -rados rmpool foo.$$ foo.$$ --yes-i-really-really-mean-it +ceph osd pool rm foo.$$ foo.$$ --yes-i-really-really-mean-it echo OK diff --git a/qa/workunits/mon/rbd_snaps_ops.sh b/qa/workunits/mon/rbd_snaps_ops.sh index 8084494acde..bdb0702808f 100755 --- a/qa/workunits/mon/rbd_snaps_ops.sh +++ b/qa/workunits/mon/rbd_snaps_ops.sh @@ -44,13 +44,13 @@ expect 'ceph osd pool delete test test --yes-i-really-really-mean-it' 0 # be an unmanaged snapshot from a not-unmanaged pool ceph osd pool delete test-foo test-foo --yes-i-really-really-mean-it || true -expect 'rados mkpool test-foo' 0 +expect 'ceph osd pool create test-foo 8' 0 expect 'rbd pool init test-foo' expect 'rbd --pool test-foo create --size 1024 image' 0 expect 'rbd --pool test-foo snap create image@snapshot' 0 ceph osd pool delete test-bar test-bar --yes-i-really-really-mean-it || true -expect 'rados mkpool test-bar' 0 +expect 'ceph osd pool create test-bar 8' 0 expect 'rbd pool init test-bar' expect 'rados cppool test-foo test-bar --yes-i-really-mean-it' 0 expect 'rbd --pool test-bar snap rm image@snapshot' 95 diff --git a/qa/workunits/rados/test_rados_timeouts.sh b/qa/workunits/rados/test_rados_timeouts.sh index f0660b3bdc3..327c7ab3238 100755 --- a/qa/workunits/rados/test_rados_timeouts.sh +++ b/qa/workunits/rados/test_rados_timeouts.sh @@ -21,9 +21,9 @@ delay_osd() { # pool ops delay_mon omap rados lspools -delay_mon poolopreply rados mkpool test +delay_mon poolopreply ceph osd pool create test 8 delay_mon poolopreply rados mksnap -p test snap -delay_mon poolopreply rados rmpool test test --yes-i-really-really-mean-it +delay_mon poolopreply ceph osd pool rm test test --yes-i-really-really-mean-it # other mon ops delay_mon getpoolstats rados df diff --git a/qa/workunits/rados/test_rados_tool.sh b/qa/workunits/rados/test_rados_tool.sh index a1c87e43a60..429a7d34211 100755 --- a/qa/workunits/rados/test_rados_tool.sh +++ b/qa/workunits/rados/test_rados_tool.sh @@ -88,7 +88,7 @@ run_expect_nosignal "$RADOS_TOOL" --snapid "0" ls run_expect_nosignal "$RADOS_TOOL" --object_locator "asdf" ls run_expect_nosignal "$RADOS_TOOL" --namespace "asdf" ls -run_expect_succ "$RADOS_TOOL" mkpool "$POOL" +run_expect_succ "$CEPH_TOOL" osd pool create "$POOL" 8 run_expect_succ "$CEPH_TOOL" osd erasure-code-profile set myprofile k=2 m=1 stripe_unit=2K crush-failure-domain=osd --force run_expect_succ "$CEPH_TOOL" osd pool create "$POOL_EC" 100 100 erasure myprofile @@ -112,11 +112,11 @@ run_expect_succ "$RADOS_TOOL" -p "$POOL" setomapheader foo2 "foo2.header" run_expect_succ "$RADOS_TOOL" -p "$POOL" export "$TDIR/expc" # make sure that --create works -run "$RADOS_TOOL" rmpool "$POOL" "$POOL" --yes-i-really-really-mean-it +run "$CEPH_TOOL" osd pool rm "$POOL" "$POOL" --yes-i-really-really-mean-it run_expect_succ "$RADOS_TOOL" -p "$POOL" --create import "$TDIR/expa" # make sure that lack of --create fails -run_expect_succ "$RADOS_TOOL" rmpool "$POOL" "$POOL" --yes-i-really-really-mean-it +run_expect_succ "$CEPH_TOOL" osd pool rm "$POOL" "$POOL" --yes-i-really-really-mean-it run_expect_fail "$RADOS_TOOL" -p "$POOL" import "$TDIR/expa" run_expect_succ "$RADOS_TOOL" -p "$POOL" --create import "$TDIR/expa" @@ -153,10 +153,10 @@ VAL=`"$RADOS_TOOL" -p "$POOL" getxattr foo "rados.toothbrush"` [ "${VAL}" = "toothbrush" ] || die "Invalid attribute after second import" # test copy pool -run "$RADOS_TOOL" rmpool "$POOL" "$POOL" --yes-i-really-really-mean-it -run "$RADOS_TOOL" rmpool "$POOL_CP_TARGET" "$POOL_CP_TARGET" --yes-i-really-really-mean-it -run_expect_succ "$RADOS_TOOL" mkpool "$POOL" -run_expect_succ "$RADOS_TOOL" mkpool "$POOL_CP_TARGET" +run "$CEPH_TOOL" osd pool rm "$POOL" "$POOL" --yes-i-really-really-mean-it +run "$CEPH_TOOL" osd pool rm "$POOL_CP_TARGET" "$POOL_CP_TARGET" --yes-i-really-really-mean-it +run_expect_succ "$CEPH_TOOL" osd pool create "$POOL" 8 +run_expect_succ "$CEPH_TOOL" osd pool create "$POOL_CP_TARGET" 8 # create src files mkdir -p "$TDIR/dir_cp_src" @@ -236,10 +236,8 @@ run_expect_fail "$RADOS_TOOL" ls --pool "$POOL" --snapid="$snapid"k run_expect_succ "$RADOS_TOOL" truncate f.1 0 --pool "$POOL" run_expect_fail "$RADOS_TOOL" truncate f.1 0k --pool "$POOL" -run "$RADOS_TOOL" rmpool delete_me_mkpool_test delete_me_mkpool_test --yes-i-really-really-mean-it -run_expect_succ "$RADOS_TOOL" mkpool delete_me_mkpool_test 0 0 -run_expect_fail "$RADOS_TOOL" mkpool delete_me_mkpool_test2 0k 0 -run_expect_fail "$RADOS_TOOL" mkpool delete_me_mkpool_test3 0 0k +run "$CEPH_TOOL" osd pool rm delete_me_mkpool_test delete_me_mkpool_test --yes-i-really-really-mean-it +run_expect_succ "$CEPH_TOOL" osd pool create delete_me_mkpool_test 1 run_expect_succ "$RADOS_TOOL" --pool "$POOL" bench 1 write run_expect_fail "$RADOS_TOOL" --pool "$POOL" bench 1k write @@ -354,7 +352,7 @@ test_rmobj() { sleep 2 done $RADOS_TOOL -p $p rm $OBJ --force-full - $RADOS_TOOL rmpool $p $p --yes-i-really-really-mean-it + $CEPH_TOOL osd pool rm $p $p --yes-i-really-really-mean-it rm $V1 } @@ -396,7 +394,7 @@ test_ls() { die "Created $TOTAL objects but saw $CHECK" fi - $RADOS_TOOL rmpool $p $p --yes-i-really-really-mean-it + $CEPH_TOOL osd pool rm $p $p --yes-i-really-really-mean-it } test_cleanup() { @@ -458,7 +456,7 @@ test_cleanup() { run_expect_succ $RADOS_TOOL -p $p cleanup --prefix benchmark_data_otherhost set -e - $RADOS_TOOL rmpool $p $p --yes-i-really-really-mean-it + $CEPH_TOOL osd pool rm $p $p --yes-i-really-really-mean-it } function test_append() diff --git a/qa/workunits/rados/test_tmap_to_omap.sh b/qa/workunits/rados/test_tmap_to_omap.sh index 76656ad726b..362cb004e33 100755 --- a/qa/workunits/rados/test_tmap_to_omap.sh +++ b/qa/workunits/rados/test_tmap_to_omap.sh @@ -7,7 +7,7 @@ expect_false() } pool="pool-$$" -rados mkpool $pool +ceph osd pool create $pool 8 rados -p $pool tmap set foo key1 value1 rados -p $pool tmap set foo key2 value2 @@ -23,6 +23,6 @@ rados -p $pool listomapkeys foo | grep key2 rados -p $pool getomapval foo key1 | grep value1 rados -p $pool getomapval foo key2 | grep value2 -rados rmpool $pool $pool --yes-i-really-really-mean-it +ceph osd pool rm $pool $pool --yes-i-really-really-mean-it echo OK diff --git a/qa/workunits/rbd/cli_generic.sh b/qa/workunits/rbd/cli_generic.sh index 95adbbbacf1..114f084ff0b 100755 --- a/qa/workunits/rbd/cli_generic.sh +++ b/qa/workunits/rbd/cli_generic.sh @@ -144,7 +144,7 @@ test_rename() { rbd rename bar bar2 rbd rename bar2 foo2 2>&1 | grep exists - rados mkpool rbd2 + ceph osd pool create rbd2 8 rbd pool init rbd2 rbd create -p rbd2 -s 1 foo rbd rename rbd2/foo rbd2/bar @@ -154,7 +154,7 @@ test_rename() { ! rbd rename rbd2/bar --dest-pool rbd foo rbd rename --pool rbd2 bar --dest-pool rbd2 foo rbd -p rbd2 ls | grep foo - rados rmpool rbd2 rbd2 --yes-i-really-really-mean-it + ceph osd pool rm rbd2 rbd2 --yes-i-really-really-mean-it remove_images } @@ -381,7 +381,7 @@ test_clone() { rbd snap create test1@s1 rbd snap protect test1@s1 - rados mkpool rbd2 + ceph osd pool create rbd2 8 rbd pool init rbd2 rbd clone test1@s1 rbd2/clone rbd -p rbd2 ls | grep clone @@ -402,7 +402,7 @@ test_clone() { rbd snap unprotect test1@s1 rbd snap rm test1@s1 rbd rm test1 - rados rmpool rbd2 rbd2 --yes-i-really-really-mean-it + ceph osd pool rm rbd2 rbd2 --yes-i-really-really-mean-it } test_trash() { diff --git a/src/bash_completion/rados b/src/bash_completion/rados index 1ea16622ff0..63501875c75 100644 --- a/src/bash_completion/rados +++ b/src/bash_completion/rados @@ -32,7 +32,7 @@ _rados() return 0 ;; rados) - COMPREPLY=( $(compgen -W "lspools mkpool rmpool df ls chown get put create rm listxattr getxattr setxattr rmxattr stat stat2 mapext lssnap mksnap rmsnap rollback bench" -- ${cur}) ) + COMPREPLY=( $(compgen -W "lspools df ls chown get put create rm listxattr getxattr setxattr rmxattr stat stat2 mapext lssnap mksnap rmsnap rollback bench" -- ${cur}) ) return 0 ;; esac diff --git a/src/test/memuse/test_pool_memuse.sh b/src/test/memuse/test_pool_memuse.sh index 878cc6175c3..5d6d6bca198 100755 --- a/src/test/memuse/test_pool_memuse.sh +++ b/src/test/memuse/test_pool_memuse.sh @@ -13,7 +13,7 @@ for i in `seq 0 $1`; do for j in `seq 0 9`; do poolnum=$((i*10+j)) poolname="pool$poolnum" - ./rados mkpool $poolname & + ./ceph osd pool create $poolname 8 & done wait done diff --git a/src/test/memuse/test_pool_memuse_tcmalloc.sh b/src/test/memuse/test_pool_memuse_tcmalloc.sh index d5e7ccdc009..ab8baaaf757 100755 --- a/src/test/memuse/test_pool_memuse_tcmalloc.sh +++ b/src/test/memuse/test_pool_memuse_tcmalloc.sh @@ -19,7 +19,7 @@ for i in `seq 0 $1`; do for j in `seq 0 9`; do poolnum=$((i*10+j)) poolname="pool$poolnum" - ./rados mkpool $poolname & + ./ceph osd pool create $poolname 8 & done wait done diff --git a/src/test/test_pools.sh b/src/test/test_pools.sh index 167becb25df..fc376477418 100755 --- a/src/test/test_pools.sh +++ b/src/test/test_pools.sh @@ -20,7 +20,7 @@ setup() { test629_impl() { # create the pool - ./rados -c ./ceph.conf mkpool foo || die "mkpool failed" + ./ceph -c ./ceph.conf osd pool create foo 8 || die "pool create failed" # Write lots and lots of objects write_objects 1 1 10 1000000 foo @@ -32,7 +32,7 @@ test629_impl() { poll_cmd "./ceph pg debug degraded_pgs_exist" TRUE 3 120 # delete the pool - ./rados -c ./ceph.conf rmpool foo || die "rmpool failed" + ./ceph -c ./ceph.conf osd pool rm foo foo --yes-i-really-really-mean-it || die "pool rm failed" # make sure the system is stable sleep 10 diff --git a/src/test/test_split.sh b/src/test/test_split.sh index 396801ebd29..d86a08af2b8 100755 --- a/src/test/test_split.sh +++ b/src/test/test_split.sh @@ -56,7 +56,7 @@ split1() { many_pools() { setup 3 for i in `seq 1 3000`; do - ./rados -c ./ceph.conf mkpool "pool${i}" || die "mkpool failed" + ./ceph -c ./ceph.conf osd pool create "pool${i}" 8 || die "pool create failed" done my_write_objects 1 10 } diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 609824af0f8..e6ac37da15c 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -72,11 +72,7 @@ void usage(ostream& out) "usage: rados [options] [commands]\n" "POOL COMMANDS\n" " lspools list pools\n" -" mkpool [123[ 4]] create pool '\n" -" [with auid 123[and using crush rule 4]]\n" " cppool copy content of a pool\n" -" rmpool [ --yes-i-really-really-mean-it]\n" -" remove pool '\n" " purge --yes-i-really-really-mean-it\n" " remove all objects from pool without removing it\n" " df show per-pool and total usage\n" @@ -3024,38 +3020,6 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, ret = 0; } - else if (strcmp(nargs[0], "mkpool") == 0) { - int auid = 0; - __u8 crush_rule = 0; - if (nargs.size() < 2) - usage_exit(); - if (nargs.size() > 2) { - char* endptr = NULL; - auid = strtol(nargs[2], &endptr, 10); - if (*endptr) { - cerr << "Invalid value for auid: '" << nargs[2] << "'" << std::endl; - ret = -EINVAL; - goto out; - } - cerr << "setting auid:" << auid << std::endl; - if (nargs.size() > 3) { - crush_rule = (__u8)strtol(nargs[3], &endptr, 10); - if (*endptr) { - cerr << "Invalid value for crush-rule: '" << nargs[3] << "'" << std::endl; - ret = -EINVAL; - goto out; - } - cerr << "using crush rule " << (int)crush_rule << std::endl; - } - } - ret = rados.pool_create_with_rule(nargs[1], crush_rule); - if (ret < 0) { - cerr << "error creating pool " << nargs[1] << ": " - << cpp_strerror(ret) << std::endl; - goto out; - } - cout << "successfully created pool " << nargs[1] << std::endl; - } else if (strcmp(nargs[0], "cppool") == 0) { bool force = nargs.size() == 4 && !strcmp(nargs[3], "--yes-i-really-mean-it"); if (nargs.size() != 3 && !(nargs.size() == 4 && force)) @@ -3092,30 +3056,6 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, } cout << "successfully copied pool " << nargs[1] << std::endl; } - else if (strcmp(nargs[0], "rmpool") == 0) { - if (nargs.size() < 2) - usage_exit(); - if (nargs.size() < 4 || - strcmp(nargs[1], nargs[2]) != 0 || - strcmp(nargs[3], "--yes-i-really-really-mean-it") != 0) { - cerr << "WARNING:\n" - << " This will PERMANENTLY DESTROY an entire pool of objects with no way back.\n" - << " To confirm, pass the pool to remove twice, followed by\n" - << " --yes-i-really-really-mean-it" << std::endl; - ret = -1; - goto out; - } - ret = rados.pool_delete(nargs[1]); - if (ret >= 0) { - cout << "successfully deleted pool " << nargs[1] << std::endl; - } else { - cerr << "pool " << nargs[1] << " could not be removed" << std::endl; - if (ret == -EPERM) { - cerr << "Check your monitor configuration - `mon allow pool delete` is set to false by default," - << " change it to true to allow deletion of pools" << std::endl; - } - } - } else if (strcmp(nargs[0], "purge") == 0) { if (nargs.size() < 2) usage_exit(); -- 2.39.5