crushtool -o crushmap --build --num_osds 10 host straw 2 rack straw 2 row straw 2 root straw 0
ceph osd setcrushmap -i crushmap
ceph osd tree
+ceph tell osd.* injectargs --osd_max_markdown_count 1024 --osd_max_markdown_period 1
wait_for_healthy() {
while ceph health | grep down
wait_for_healthy
}
-test_mark_all_osds_down() {
+test_mark_all_but_last_osds_down() {
ceph osd set noup
- ceph osd down `ceph osd ls`
+ ceph osd down $(ceph osd ls | sed \$d)
ceph health detail
- ceph health | grep "2 rows"
- ceph health | grep "3 racks"
- ceph health | grep "5 hosts"
- ceph health | grep "10 osds"
+ ceph health | grep "1 row"
+ ceph health | grep "2 racks"
+ ceph health | grep "4 hosts"
+ ceph health | grep "9 osds"
ceph osd unset noup
wait_for_healthy
}
test_mark_two_osds_same_host_down
test_mark_two_osds_same_rack_down
-test_mark_all_osds_down
+test_mark_all_but_last_osds_down
exit 0