Whamcloud - gitweb
LU-15374 tests: check FULL and IDLE for client import state 98/49298/4
authorJian Yu <yujian@whamcloud.com>
Thu, 13 Apr 2023 06:16:51 +0000 (23:16 -0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 22 Apr 2023 17:29:27 +0000 (17:29 +0000)
The client-to-OST import state can be FULL or IDLE.

Test-Parameters: trivial testgroup=review-dne-part-3

Test-Parameters: trivial env=SLOW=no,FAILURE_MODE=HARD \
clientcount=4 mdtcount=1 mdscount=2 osscount=2 \
austeroptions=-R failover=true iscsi=1 \
testlist=recovery-mds-scale

Fixes: 25606a2ce1 ("LU-15342 tests: escape "|"")
Fixes: 3da8f014fd ("LU-12857 tests: allow clients to be IDLE after recovery")
Fixes: 5a6ceb664f ("LU-7236 ptlrpc: idle connections can disconnect")

Change-Id: I3582ceb273d241ee71fe907f6d1423746e453faa
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49298
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/conf-sanity.sh
lustre/tests/recovery-mds-scale.sh
lustre/tests/test-framework.sh

index b936134..187a90b 100644 (file)
@@ -166,7 +166,7 @@ stop_mgs() {
 start_ost() {
        echo "start ost1 service on `facet_active_host ost1`"
        start ost1 $(ostdevname 1) $OST_MOUNT_OPTS "$@" || return 95
-       wait_clients_import_state ${CLIENTS:-$HOSTNAME} ost1 FULL
+       wait_clients_import_ready ${CLIENTS:-$HOSTNAME} ost1
 }
 
 stop_ost() {
@@ -178,7 +178,7 @@ stop_ost() {
 start_ost2() {
        echo "start ost2 service on `facet_active_host ost2`"
        start ost2 $(ostdevname 2) $OST_MOUNT_OPTS "$@" || return 92
-       wait_clients_import_state ${CLIENTS:-$HOSTNAME} ost2 FULL
+       wait_clients_import_ready ${CLIENTS:-$HOSTNAME} ost2
 }
 
 stop_ost2() {
@@ -8061,7 +8061,7 @@ test_101b () {
        sleep 25
        start_ost
 
-       wait_osc_import_state client ost1 FULL
+       wait_osc_import_ready client ost1
        touch $dir/$tfile || error "Can't create file"
 
        cleanup
@@ -9034,8 +9034,8 @@ test_112() {
 
        mount_client $MOUNT || error "mount client failed"
        wait_osc_import_state mds1 ost1 FULL
-       wait_osc_import_state client ost1 FULL
-       wait_osc_import_state client ost2 FULL
+       wait_osc_import_ready client ost1
+       wait_osc_import_ready client ost2
 
        $LFS setstripe -i 0 $DIR/$tfile.0 ||
                error "problem creating $tfile.0 on OST0000"
index c40c9f9..e20cee9 100644 (file)
@@ -178,10 +178,9 @@ failover_target() {
                    exit 7
                fi
 
-               local want="FULL\|IDLE"
-               log "Checking clients are in $want state before next failover"
-               wait_clients_import_state $NODES_TO_USE $serverfacet "$want" ||
-                       echo "Client import not $want, please consider to" \
+               log "Checking clients are in FULL or IDLE state before next failover"
+               wait_clients_import_ready $NODES_TO_USE $serverfacet ||
+                       echo "Client import is not ready, please consider to" \
                        "increase SERVER_FAILOVER_PERIOD=" \
                        "$SERVER_FAILOVER_PERIOD!"
 
index 92a124e..7205ae6 100755 (executable)
@@ -3943,7 +3943,7 @@ fail() {
        export SK_NO_KEY=$SK_NO_KEY_save
        # to initiate all OSC idling connections
        clients_up
-       wait_clients_import_state "$clients" "$facets" "\(FULL\|IDLE\)"
+       wait_clients_import_ready "$clients" "$facets"
        clients_up || error "post-failover stat: $?"
 }
 
@@ -8100,6 +8100,10 @@ wait_clients_import_state () {
        fi
 }
 
+wait_clients_import_ready() {
+       wait_clients_import_state "$1" "$2" "\(FULL\|IDLE\)"
+}
+
 wait_osp_active() {
        local facet=$1
        local tgt_name=$2