]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/workunits/mon/pool_ops.sh
import quincy beta 17.1.0
[ceph.git] / ceph / qa / workunits / mon / pool_ops.sh
index 6baae495ddd4b9c9b2eda247b7913342a6b1659a..23bb3c0beda7f33ce5ffedc7b372ce19ce6047a4 100755 (executable)
@@ -43,10 +43,27 @@ function expect_config_value()
   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
@@ -63,16 +80,6 @@ expect_config_value "foo" "min_size" 5
 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