diff options
author | Sage Weil <sage@inktank.com> | 2013-04-03 15:45:34 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-04-03 15:45:34 -0700 |
commit | 29f9db19807a1a7f2991deaa6cd3947223c8d42b (patch) | |
tree | dc65ddcde0a481131f234469edcf0d7c531230d3 /qa | |
parent | e6d4582a68f3efa0907dfa5945a9adceeb6d1319 (diff) | |
download | ceph-29f9db19807a1a7f2991deaa6cd3947223c8d42b.tar.gz |
mon: fix crush unit tests for idempotency
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/workunits/mon/crush_ops.sh | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/qa/workunits/mon/crush_ops.sh b/qa/workunits/mon/crush_ops.sh index 536c3d12934..748d00bc363 100755 --- a/qa/workunits/mon/crush_ops.sh +++ b/qa/workunits/mon/crush_ops.sh @@ -36,32 +36,27 @@ 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 crush unlink host1 foo 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 rm foo && exit 1 || true # not empty +ceph osd crush rm bar && exit 1 || true # not empty ceph osd crush unlink host1 bar ceph osd tree | grep -c host1 | grep -q 1 # now an orphan 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 rm bar && exit 1 || true # not empty 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 -# FIXME: these should be idempotent! -ceph osd crush rm osd.$o1 && exit 1 || true -ceph osd crush rm osd.$o2 && exit 1 || true +ceph osd crush rm osd.$o1 +ceph osd crush rm osd.$o2 echo OK |