Whamcloud - gitweb
LU-14361 statahead: add connect flag check for batch RPC 75/54275/3
authorQian Yingjin <qian@ddn.com>
Tue, 5 Mar 2024 03:40:31 +0000 (22:40 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 13 Mar 2024 03:23:01 +0000 (03:23 +0000)
The tests (sanity/test_123 test case series) are all failing for
servers that do not have batch RPC support.
In this patch we add the connect feature flag check in
mdc.*.import for batch RPC support and skip the batch stat-ahead
tests without this support.

Test-Parameters: trivial
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I54c95722df803131727e5882156570c9da5293ee
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54275
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
lustre/tests/sanity.sh

index af565e7..f838810 100755 (executable)
@@ -14523,6 +14523,9 @@ test_123ad() {
        (( $MDS1_VERSION >= $(version_code 2.15.53) )) ||
                skip "Need server version at least 2.15.53"
 
+       $LCTL get_param -n mdc.*.connect_flags | grep -q batch_rpc ||
+               skip "Server does not support batch RPC"
+
        local max
        local batch_max
 
@@ -14610,6 +14613,9 @@ test_123e() {
        local batch_max
        local dir=$DIR/$tdir
 
+       $LCTL get_param -n mdc.*.connect_flags | grep -q batch_rpc ||
+               skip "Server does not support batch RPC"
+
        mkdir $dir || error "mkdir $dir failed"
        $LFS setstripe -C 32 $dir || error "setstripe $dir failed"
        stack_trap "rm -rf $dir"
@@ -14635,6 +14641,9 @@ test_123f() {
        local batch_max
        local dir=$DIR/$tdir
 
+       $LCTL get_param -n mdc.*.connect_flags | grep -q batch_rpc ||
+               skip "Server does not support batch RPC"
+
        mkdir $dir || error "mkdir $dir failed"
        $LFS setstripe -C 1000 $dir || error "setstripe $dir failed"
        stack_trap "rm -rf $dir"
@@ -14660,6 +14669,9 @@ test_123g() {
        local dir=$DIR/$tdir
        local num=1000
 
+       $LCTL get_param -n mdc.*.connect_flags | grep -q batch_rpc ||
+               skip "Server does not support batch RPC"
+
        mkdir $dir || error "failed to mkdir $dir"
        createmany -o $dir/$tfile $num || error "failed creatmany files"
        cancel_lru_locks mdc
@@ -14724,6 +14736,9 @@ test_123h() {
        local batch_max
        local enabled
 
+       $LCTL get_param -n mdc.*.connect_flags | grep -q batch_rpc ||
+               skip "Server does not support batch RPC"
+
        max=$($LCTL get_param -n llite.*.statahead_max | head -n 1)
        batch_max=$($LCTL get_param -n llite.*.statahead_batch_max | head -n 1)
        enabled=$($LCTL get_param -n llite.*.enable_statahead_fname | head -n 1)
@@ -14789,6 +14804,9 @@ test_123i() {
        local enabled
        local min
 
+       $LCTL get_param -n mdc.*.connect_flags | grep -q batch_rpc ||
+               skip "Server does not support batch RPC"
+
        max=$($LCTL get_param -n llite.*.statahead_max | head -n 1)
        batch_max=$($LCTL get_param -n llite.*.statahead_batch_max | head -n 1)
        min=$($LCTL get_param -n llite.*.statahead_min | head -n 1)