]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: drop repeated 'goodchars' and add osd crush ls testcase 24713/head
authorYan Jun <yan.jun8@zte.com.cn>
Tue, 23 Oct 2018 08:19:10 +0000 (16:19 +0800)
committerYan Jun <yan.jun8@zte.com.cn>
Tue, 23 Oct 2018 08:32:45 +0000 (16:32 +0800)
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
qa/standalone/mon/osd-crush.sh
src/mon/MonCommands.h

index 84a6be2a9e861ec1022f81d2553cc3c0e6fa389f..b639bcce99764b3b190caede5a95c23147b38263 100755 (executable)
@@ -208,6 +208,16 @@ function TEST_crush_rename_bucket() {
     ceph osd crush rename-bucket nonexistent something 2>&1 | grep "Error ENOENT" || return 1
 }
 
+function TEST_crush_ls_node() {
+    local dir=$1
+    run_mon $dir a || return 1
+    ceph osd crush add-bucket default1 root
+    ceph osd crush add-bucket host1 host
+    ceph osd crush move host1 root=default1
+    ceph osd crush ls default1 | grep host1 || return 1
+    ceph osd crush ls default2 2>&1 | grep "Error ENOENT" || return 1
+}
+
 function TEST_crush_reject_empty() {
     local dir=$1
     run_mon $dir a || return 1
index 0e1c1049fed2dd241c6bceaacd4478e3444995c0..202282c1a061c1d95fa784f2b10ce305b4321b31 100644 (file)
@@ -671,7 +671,7 @@ COMMAND("osd crush tree "
         "name=shadow,type=CephChoices,strings=--show-shadow,req=false", \
        "dump crush buckets and items in a tree view",
        "osd", "r", "cli,rest")
-COMMAND("osd crush ls name=node,type=CephString,goodchars=goodchars=[A-Za-z0-9-_.]",
+COMMAND("osd crush ls name=node,type=CephString,goodchars=[A-Za-z0-9-_.]",
        "list items beneath a node in the CRUSH tree",
        "osd", "r", "cli,rest")
 COMMAND("osd crush class ls", \