qa/workunits/mon: test for crush rule size in pool set size command

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
This commit is contained in:
Vikhyat Umrao 2019-10-07 13:59:09 -07:00
parent ddc467f82f
commit e1451c92d8

View File

@ -25,6 +25,16 @@ ceph osd pool set foo size 10
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