Whamcloud - gitweb
LU-16915 tests: except sanity-sec test_51
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 12 Apr 2024 01:18:28 +0000 (19:18 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 30 May 2024 00:38:47 +0000 (00:38 +0000)
Skip sanity-sec test_51 since it has started failing recently with
the move to el9.3 servers.

Add common lustre_os_release infrastructure to make such checking
easier in the future.

Lustre-change: https://review.whamcloud.com/54751
Lustre-commit: b881bd1051451ed18610e0cc3c3cd56c8803cbc9

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id02223752df4eb3fd3b62b339e8c417eb3e86a12
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55212
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity-sec.sh
lustre/tests/test-framework.sh

index a16e74d..cc4ffe3 100755 (executable)
@@ -16,6 +16,10 @@ init_logging
 
 ALWAYS_EXCEPT="$SANITY_SEC_EXCEPT "
 always_except EX-7601  66
+if [[ "$MDS1_OS_ID" == "rhel" || "$MDS1_OS_ID_LIKE" =~ "rhel" ]] &&
+   (( $MDS1_OS_VERSION_CODE == $(version_code 9.3) )); then
+       always_except LU-16915 51
+fi
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="26"
 
@@ -4386,8 +4390,8 @@ test_50() {
 run_test 50 "DoM encrypted file"
 
 test_51() {
-       [ "$MDS1_VERSION" -gt $(version_code 2.13.53) ] ||
-               skip "Need MDS version at least 2.13.53"
+       (( "$MDS1_VERSION" >= $(version_code v2_13_55-38-gf05edf8e2b) )) ||
+               skip "Need MDS version at least 2.13.55.38"
 
        mkdir $DIR/$tdir || error "mkdir $tdir"
        local mdts=$(comma_list $(mdts_nodes))
index db84144..01580b3 100755 (executable)
@@ -167,6 +167,17 @@ get_lustre_env() {
        export OST1_VERSION=$(lustre_version_code ost1)
        export CLIENT_VERSION=$(lustre_version_code client)
 
+       # import server-side version information into local variables
+       # so they can be used in tests instead of checked separately
+       # MGS_OS_VERSION_ID, MGS_OS_ID, MGS_OS_ID_LIKE,
+       # MDS1_OS_VERSION_ID, MDS1_OS_ID, MDS1_OS_ID_LIKE,
+       # OST1_OS_VERSION_ID, OST1_OS_ID, OST1_OS_ID_LIKE,
+       # CLIENT_OS_VERSION_ID, CLIENT_OS_ID, CLIENT_OS_ID_LIKE
+       lustre_os_release "eval export" mgs
+       lustre_os_release "eval export" mds1
+       lustre_os_release "eval export" ost1
+       lustre_os_release "eval export" client
+
        # Prefer using "mds1" directly instead of SINGLEMDS.
        # Keep this for compat until it is removed from scripts.
        export SINGLEMDS=${SINGLEMDS:-mds1}
@@ -543,6 +554,31 @@ lustre_version_code() {
        version_code $(lustre_build_version $1)
 }
 
+# Extract the server-side /etc/os-release information into local variables
+# usage: lustre_os_release <facet>
+# generates $facet_OS_ID, $facet_OS_ID_LIKE, $facet_VERSION_ID
+# and also $facet_OS_VERSION_CODE=$(version_code $facet_VERSION_ID)
+lustre_os_release() {
+       local action=${1:-echo}
+       local facet=$2
+       local FACET_OS=$(tr "[:lower:]" "[:upper:]" <<<$facet)_OS_
+
+       [[ "$action" == "echo" ]] &&
+               echo "$facet: $(do_facet $facet "cat /etc/system-release")"
+       do_facet $facet "[[ -r /etc/os-release ]] || ls -s /etc/*release" 1>&2
+
+       while read LINE; do
+       case $LINE in
+       VERSION_ID=*|ID=*|ID_LIKE=*) $action ${FACET_OS}$LINE ;;
+       esac
+       done < <(do_facet $facet "cat /etc/os-release")
+
+       [[ "$action" == "echo" ]] && return 0
+
+       local facet_version=${FACET_OS}VERSION
+       $action ${facet_version}_CODE=\$\(version_code \$${facet_version}_ID\)
+}
+
 module_loaded () {
        /sbin/lsmod | grep -q "^\<$1\>"
 }
@@ -9261,8 +9297,11 @@ init_logging() {
 
        # log actual client and server versions if needed for debugging
        log "Client: $(lustre_build_version client)"
+       lustre_os_release echo client
        log "MDS: $(lustre_build_version mds1)"
+       lustre_os_release echo mds1
        log "OSS: $(lustre_build_version ost1)"
+       lustre_os_release echo ost1
 }
 
 log_test() {