Whamcloud - gitweb
LU-17175 tests: fix sanity-krb5 test_5 in interop mode 03/54103/3
authorSebastien Buisson <sbuisson@ddn.com>
Tue, 20 Feb 2024 09:58:40 +0000 (10:58 +0100)
committerOleg Drokin <green@whamcloud.com>
Wed, 17 Apr 2024 05:23:58 +0000 (05:23 +0000)
With newer servers, the lsvcgssd daemon is automatically restarted
when the server needs to process a gss request. So do not error out
if a file system access succeeds whereas the daemon was explicitly
killed.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I52ec49ca584f07100699274fe3a52ea28d227c17
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54103
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity-krb5.sh

index 9725e9a..234e0c7 100755 (executable)
@@ -304,9 +304,19 @@ test_5() {
 
        # flush context, and touch
        $RUNAS $LFS flushctx $MOUNT || error "can't flush context on $MOUNT"
-       $RUNAS touch $file2 && error 'should fail without lsvcgssd'
+       $RUNAS touch $file2
+       if [ $? -eq 0 ]; then
+               # with newer servers, daemon is restarted automatically
+               if (( CLIENT_VERSION == MDS1_VERSION )); then
+                       error '$RUNAS touch $file2 should fail without lsvcgssd'
+               else
+                       echo "$RUNAS touch $file2 succeeded"
+               fi
+       else
+               echo "$RUNAS touch $file2 failed as expected"
+       fi
 
-       # restart lsvcgssd, expect touch suceed
+       # restart lsvcgssd, expect touch succeed
        echo "restart lsvcgssd and recovering"
        start_gss_daemons $(comma_list $(mdts_nodes)) "$LSVCGSSD -v"
        sleep 5