ceph/qa/workunits/mon/crush_ops.sh
Sage Weil b79067a863 qa: add workunits/mon/crush_ops.sh
Test creating, listing, removing crush rules via the mon.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-05 14:31:13 -08:00

24 lines
490 B
Bash
Executable File

#!/bin/sh -x
set -e
ceph osd crush dump
ceph osd crush rule dump
ceph osd crush rule ls
ceph osd crush rule list
ceph osd crush rule create-simple foo default host
ceph osd crush rule create-simple foo default host
ceph osd crush rule create-simple bar default host
ceph osd crush rule ls | grep foo
ceph osd crush rule rm foo
ceph osd crush rule rm foo # idempotent
ceph osd crush rule rm bar
# can't delete in-use rules, tho:
ceph osd crush rule rm data && exit 1 || true
echo OK