]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: allow user to permanently delete pool
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 10 Jul 2017 07:22:32 +0000 (15:22 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 10 Jul 2017 18:14:06 +0000 (02:14 +0800)
If mon_fake_pool_delete is enabled, "osd pool delete"
will unable to delete pool permanently, as we ask user
to pass in a "--yes-i-really-really-mean-it-no-faking"
string now.

The old "osd pool delete" command won't allow user to do this.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/MonCommands.h
src/test/pybind/test_ceph_argparse.py

index 679166864749c9f4aa661045fae30fe09d6df12e..8d974660f29d05f71f2815708ede355cd50e2814 100644 (file)
@@ -850,7 +850,7 @@ COMMAND("osd pool create " \
 COMMAND("osd pool delete " \
        "name=pool,type=CephPoolname " \
        "name=pool2,type=CephPoolname,req=false " \
-       "name=sure,type=CephChoices,strings=--yes-i-really-really-mean-it,req=false", \
+       "name=sure,type=CephString,req=false", \
        "delete pool", \
        "osd", "rw", "cli,rest")
 COMMAND("osd pool rm " \
index 882487cc678f4daa838faf53dd3aadca19c76a63..7220c91c6a2dca7365cbe55ca8c9e7210de08846 100755 (executable)
@@ -1015,9 +1015,6 @@ class TestOSD(TestArgparse):
         self.assert_valid_command(['osd', 'pool', 'delete',
                                    'poolname'])
         assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'delete']))
-        assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'delete',
-                                                    'poolname', 'poolname',
-                                                    'not really']))
         assert_equal({}, validate_command(sigdict,
                                           ['osd', 'pool', 'delete',
                                            'poolname', 'poolname',