fi
}
+# pg_num min/max
+TEST_POOL=testpool1234
+ceph osd pool create testpool1234 8 --autoscale-mode off
+ceph osd pool set $TEST_POOL pg_num_min 2
+ceph osd pool get $TEST_POOL pg_num_min | grep 2
+ceph osd pool set $TEST_POOL pg_num_max 33
+ceph osd pool get $TEST_POOL pg_num_max | grep 33
+expect_false ceph osd pool set $TEST_POOL pg_num_min 9
+expect_false ceph osd pool set $TEST_POOL pg_num_max 7
+expect_false ceph osd pool set $TEST_POOL pg_num 1
+expect_false ceph osd pool set $TEST_POOL pg_num 44
+ceph osd pool set $TEST_POOL pg_num_min 0
+expect_false ceph osd pool get $TEST_POOL pg_num_min
+ceph osd pool set $TEST_POOL pg_num_max 0
+expect_false ceph osd pool get $TEST_POOL pg_num_max
+ceph osd pool delete $TEST_POOL $TEST_POOL --yes-i-really-really-mean-it
+
# note: we need to pass the other args or ceph_argparse.py will take
# 'invalid' that is not replicated|erasure and assume it is the next
# argument, which is a string.
-expect_false ceph osd pool create foo 123 123 invalid foo-profile foo-ruleset
+expect_false ceph osd pool create foo 123 123 invalid foo-profile foo-rule
ceph osd pool create foo 123 123 replicated
ceph osd pool create fooo 123 123 erasure default
expect_false ceph osd pool set foo size 0
expect_false ceph osd pool set foo size 20
-ceph osd pool set foo size 3
-ceph osd getcrushmap -o crush
-crushtool -d crush -o crush.txt
-sed -i 's/max_size 10/max_size 3/' crush.txt
-crushtool -c crush.txt -o crush.new
-ceph osd setcrushmap -i crush.new
-expect_false ceph osd pool set foo size 4
-ceph osd setcrushmap -i crush
-rm -f crush crush.txt crush.new
-
# should fail due to safety interlock
expect_false ceph osd pool delete foo
expect_false ceph osd pool delete foo foo