Whamcloud - gitweb
LU-16915 tests: except sanity-sec test_51 51/54751/15
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 12 Apr 2024 01:18:28 +0000 (19:18 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 12 Apr 2024 18:25:41 +0000 (18:25 +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.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-sec env=ONLY=51,HONOR_EXCEPT=y serverdistro=el9.3
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id02223752df4eb3fd3b62b339e8c417eb3e86a12
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54751
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-sec.sh
lustre/tests/test-framework.sh

index b302a28..51ca209 100755 (executable)
@@ -15,9 +15,10 @@ init_test_env $@
 init_logging
 
 ALWAYS_EXCEPT="$SANITY_SEC_EXCEPT "
-# bug number for skipped test:
-ALWAYS_EXCEPT+=" "
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
+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"
 
@@ -4381,8 +4382,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 2f79852..120f5a1 100755 (executable)
@@ -382,6 +382,17 @@ get_lustre_env() {
                export MDS1_VERSION=$(lustre_version_code mds1)
                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
        fi
 
        # Prefer using "mds1" directly instead of SINGLEMDS.
@@ -757,6 +768,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\>"
 }
@@ -9555,8 +9591,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() {