From: Vikhyat Umrao Date: Mon, 7 Oct 2019 20:59:09 +0000 (-0700) Subject: qa/workunits/mon: test for crush rule size in pool set size command X-Git-Tag: v14.2.5~94^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eee12ad94a4b84ddfab00a1d80fc97ce6a20f12e;p=ceph.git qa/workunits/mon: test for crush rule size in pool set size command Signed-off-by: Vikhyat Umrao (cherry picked from commit e1451c92d8ef3c42f60ee02f8a090cb178db5e5e) --- diff --git a/qa/workunits/mon/pool_ops.sh b/qa/workunits/mon/pool_ops.sh index a336fd544e72..4098795b9892 100755 --- a/qa/workunits/mon/pool_ops.sh +++ b/qa/workunits/mon/pool_ops.sh @@ -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