summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-26 22:47:11 -0700
committerSage Weil <sage@inktank.com>2013-03-26 22:47:37 -0700
commit3f2e71169a540519f669f406789b319cf6989686 (patch)
treefeb147fa5ff7c24209b06e6b3ec0c68eb348a65e /qa
parentae993c47c455370a1f660168fc6ff5a6b051fcb8 (diff)
downloadceph-3f2e71169a540519f669f406789b319cf6989686.tar.gz
mon: fix crush_ops.sh tests
Make it work. Also, make note that these aren't handled idempotently by the mon currently. Doh! Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'qa')
-rwxr-xr-xqa/workunits/mon/crush_ops.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/qa/workunits/mon/crush_ops.sh b/qa/workunits/mon/crush_ops.sh
index 05bc87108df..536c3d12934 100755
--- a/qa/workunits/mon/crush_ops.sh
+++ b/qa/workunits/mon/crush_ops.sh
@@ -36,27 +36,32 @@ ceph osd tree | grep -c osd.$o1 | grep -q 2
ceph osd tree | grep -c host1 | grep -q 2
ceph osd tree | grep -c osd.$o2 | grep -q 2
ceph osd tree | grep -c host2 | grep -q 2
+# FIXME: these should be idempotent!
ceph osd crush rm host1 foo && exit 1 || true # not empty
ceph osd crush unlink host1 foo
+# FIXME: these should be idempotent!
ceph osd crush unlink host1 foo && exit 1 || true # not there anymore
ceph osd tree | grep -c host1 | grep -q 1
+# FIXME: these should be idempotent!
ceph osd crush rm foo && exit 1 || true
ceph osd crush rm bar && exit 1 || true
ceph osd crush unlink host1 bar
ceph osd tree | grep -c host1 | grep -q 1 # now an orphan
-ceph osd crush rm osd.1 host1
+ceph osd crush rm osd.$o1 host1
ceph osd crush rm host1
ceph osd tree | grep -c host1 | grep -q 0
+# FIXME: these should be idempotent!
ceph osd crush rm bar && exit 1 || true
ceph osd crush unlink host2
ceph osd crush rm bar
ceph osd crush rm foo
ceph osd crush rm osd.$o2 host2
ceph osd crush rm host2
-ceph osd crush rm osd.$o1
-ceph osd crush rm osd.$o2
-ceph osd crush rm osd.$o2 && exti 1 || true
+
+# FIXME: these should be idempotent!
+ceph osd crush rm osd.$o1 && exit 1 || true
+ceph osd crush rm osd.$o2 && exit 1 || true
echo OK