From: Yan Jun Date: Tue, 23 Oct 2018 08:19:10 +0000 (+0800) Subject: mon: drop repeated 'goodchars' and add osd crush ls testcase X-Git-Tag: v14.1.0~1078^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F24713%2Fhead;p=ceph.git mon: drop repeated 'goodchars' and add osd crush ls testcase Signed-off-by: Yan Jun --- diff --git a/qa/standalone/mon/osd-crush.sh b/qa/standalone/mon/osd-crush.sh index 84a6be2a9e86..b639bcce9976 100755 --- a/qa/standalone/mon/osd-crush.sh +++ b/qa/standalone/mon/osd-crush.sh @@ -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 diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 0e1c1049fed2..202282c1a061 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -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", \