From 01918803768c865c47776d5e38ee6eda64e95797 Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Tue, 20 Feb 2024 10:58:40 +0100 Subject: [PATCH] LU-17175 tests: fix sanity-krb5 test_5 in interop mode 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 Change-Id: I52ec49ca584f07100699274fe3a52ea28d227c17 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54103 Reviewed-by: Andreas Dilger Reviewed-by: Aurelien Degremont Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/tests/sanity-krb5.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lustre/tests/sanity-krb5.sh b/lustre/tests/sanity-krb5.sh index 9725e9a..234e0c7 100755 --- a/lustre/tests/sanity-krb5.sh +++ b/lustre/tests/sanity-krb5.sh @@ -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 -- 1.8.3.1