Whamcloud - gitweb
LU-15785 tests: do not detect versions for RPC_MODE mode
authorElena Gryaznova <elena.gryaznova@hpe.com>
Tue, 26 Apr 2022 13:37:27 +0000 (16:37 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 31 May 2024 19:43:22 +0000 (19:43 +0000)
lustre_version_code() is called each time when do_rpc_nodes()
is called. It is not needed to detect versions for RPC_MODE mode.

Lustre-change: https://review.whamcloud.com/47144
Lustre-change: e3fcd81ae5f378ac62754a659c7adf0e0b656cf3

Fixes: 8fa23490bb ("LU-1538 tests: standardize test script init - sanity")
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10914
Change-Id: Ia7645de0a4eedfddf859c80e661ebcb2e45de140
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55272
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/test-framework.sh

index efefe24..19735d2 100755 (executable)
@@ -158,25 +158,26 @@ print_summary () {
 # output: No return values, environment variables are exported
 
 get_lustre_env() {
-
-       export mds1_FSTYPE=${mds1_FSTYPE:-$(facet_fstype mds1)}
-       export ost1_FSTYPE=${ost1_FSTYPE:-$(facet_fstype ost1)}
-
-       export MGS_VERSION=$(lustre_version_code mgs)
-       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 mgs
-       lustre_os_release mds1
-       lustre_os_release ost1
-       lustre_os_release client
+       if ! $RPC_MODE; then
+               export mds1_FSTYPE=${mds1_FSTYPE:-$(facet_fstype mds1)}
+               export ost1_FSTYPE=${ost1_FSTYPE:-$(facet_fstype ost1)}
+
+               export MGS_VERSION=$(lustre_version_code mgs)
+               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 mgs
+               lustre_os_release mds1
+               lustre_os_release ost1
+               lustre_os_release client
+       fi
 
        # Prefer using "mds1" directly instead of SINGLEMDS.
        # Keep this for compat until it is removed from scripts.