]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/cephtool: check_response didn't find erasure-code string 46869/head
authorNikhilkumar Shelke <nshelke@redhat.com>
Tue, 28 Jun 2022 11:13:13 +0000 (16:43 +0530)
committerNikhilkumar Shelke <nshelke@redhat.com>
Wed, 29 Jun 2022 06:58:55 +0000 (12:28 +0530)
1. If data or metadata pool is already in-use by filesystem
then it is not allowed to reuse the same pool for another
filesystems.

2. Test is failing because above(1) restrictions/checks comes
before checking erasure-code pools. Hence test is failing
and not finding expected error string in output.

3. Proposed fix checks newly added error string instead of
'erasure-code'.

4. Also adding new tests to verify string 'erasure-code'
by passing --force option so that check for pools reuse(1)
will be skipped and check for 'erasure-code' will be hit.

Fixes: https://tracker.ceph.com/issues/56384
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
qa/workunits/cephtool/test.sh

index 6ee0e5aec2939b419983aa42494e97e774e985ed..13690af4b5d87a2db9b6d832e465db1a750129a4 100755 (executable)
@@ -1028,6 +1028,8 @@ function test_mon_mds()
   ceph fs new $FS_NAME fs_metadata mds-ec-pool --force 2>$TMPFILE
   check_response 'erasure-code' $? 22
   ceph fs new $FS_NAME mds-ec-pool fs_data 2>$TMPFILE
+  check_response 'already used by filesystem' $? 22
+  ceph fs new $FS_NAME mds-ec-pool fs_data --force 2>$TMPFILE
   check_response 'erasure-code' $? 22
   ceph fs new $FS_NAME mds-ec-pool mds-ec-pool 2>$TMPFILE
   check_response 'erasure-code' $? 22
@@ -1067,8 +1069,12 @@ function test_mon_mds()
   ceph fs new $FS_NAME fs_metadata mds-tier --force 2>$TMPFILE
   check_response 'in use as a cache tier' $? 22
   ceph fs new $FS_NAME mds-tier fs_data 2>$TMPFILE
+  check_response 'already used by filesystem' $? 22
+  ceph fs new $FS_NAME mds-tier fs_data --force 2>$TMPFILE
   check_response 'in use as a cache tier' $? 22
   ceph fs new $FS_NAME mds-tier mds-tier 2>$TMPFILE
+  check_response 'already used by filesystem' $? 22
+  ceph fs new $FS_NAME mds-tier mds-tier --force 2>$TMPFILE
   check_response 'in use as a cache tier' $? 22
   set -e
 
@@ -1099,6 +1105,8 @@ function test_mon_mds()
   # ...but not as the metadata pool
   set +e
   ceph fs new $FS_NAME mds-ec-pool fs_data 2>$TMPFILE
+  check_response 'already used by filesystem' $? 22
+  ceph fs new $FS_NAME mds-ec-pool fs_data --force 2>$TMPFILE
   check_response 'erasure-code' $? 22
   set -e