]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunit: cephtool: test mds newfs and add_data_pool with ec pools
authorJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 20 Jun 2014 15:25:35 +0000 (16:25 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 23 Jun 2014 23:48:43 +0000 (00:48 +0100)
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa/workunits/cephtool/test.sh

index dc99a086da6c1c41e1e2c4ee4e33662a7ca98dfd..708a650a18a43de5cc06a023bc1e7f1157590caf 100755 (executable)
@@ -86,7 +86,6 @@ function expect_config_value()
   fi
 }
 
-
 # Test SI units during injectargs and 'config set'
 # We only aim at testing the units are parsed accordingly
 # and don't intend to test whether the options being set
@@ -315,6 +314,24 @@ ceph mds set allow_new_snaps false
 ceph mds set allow_new_snaps no
 expect_false ceph mds set allow_new_snaps taco
 
+# we should never be able to add EC pools as data or metadata pools
+# create an ec-pool
+ceph osd pool create mds-ec-pool 10 10 erasure
+set +e
+ceph mds add_data_pool mds-ec-pool 2>$TMPFILE
+check_response 'erasure-code' $? 22
+set -e
+poolnum=$(ceph osd dump | grep 'pool.*mds-ec-pool' | awk '{print $2;}')
+set +e
+ceph mds newfs 0 $poolnum --yes-i-really-mean-it 2>$TMPFILE
+check_response 'erasure-code' $? 22
+ceph mds newfs $poolnum 1 --yes-i-really-mean-it 2>$TMPFILE
+check_response 'erasure-code' $? 22
+ceph mds newfs $poolnum $poolnum --yes-i-really-mean-it 2>$TMPFILE
+check_response 'erasure-code' $? 22
+set -e
+ceph osd pool delete mds-ec-pool mds-ec-pool --yes-i-really-really-mean-it
+
 ceph mds stat
 # ceph mds tell mds.a getmap
 # ceph mds rm