5 function expect_false
()
8 if "$@"; then return 1; else return 0; fi
11 # note: we need to pass the other args or ceph_argparse.py will take
12 # 'invalid' that is not replicated|erasure and assume it is the next
13 # argument, which is a string.
14 expect_false ceph osd pool create foo
123 123 invalid foo-profile foo-ruleset
16 ceph osd pool create foo
123 123 replicated
17 ceph osd pool create fooo
123 123 erasure default
18 ceph osd pool create foooo
123
20 ceph osd pool create foo
123 # idempotent
22 ceph osd pool
set foo size
1
23 ceph osd pool
set foo size
4
24 ceph osd pool
set foo size
10
25 expect_false ceph osd pool
set foo size
0
26 expect_false ceph osd pool
set foo size
20
28 ceph osd pool
set foo size
3
29 ceph osd getcrushmap
-o crush
30 crushtool
-d crush
-o crush.txt
31 sed -i 's/max_size 10/max_size 3/' crush.txt
32 crushtool
-c crush.txt
-o crush.new
33 ceph osd setcrushmap
-i crush.new
34 expect_false ceph osd pool
set foo size
4
35 ceph osd setcrushmap
-i crush
36 rm -f crush crush.txt crush.new
38 # should fail due to safety interlock
39 expect_false ceph osd pool delete foo
40 expect_false ceph osd pool delete foo foo
41 expect_false ceph osd pool delete foo foo
--force
42 expect_false ceph osd pool delete foo fooo
--yes-i-really-mean-it
43 expect_false ceph osd pool delete foo
--yes-i-really-mean-it foo
45 ceph osd pool delete foooo foooo
--yes-i-really-really-mean-it
46 ceph osd pool delete fooo fooo
--yes-i-really-really-mean-it
47 ceph osd pool delete foo foo
--yes-i-really-really-mean-it
50 ceph osd pool delete foo foo
--yes-i-really-really-mean-it
51 ceph osd pool delete fooo fooo
--yes-i-really-really-mean-it
52 ceph osd pool delete fooo fooo
--yes-i-really-really-mean-it
55 ceph osd pool delete fuggg fuggg
--yes-i-really-really-mean-it