Whamcloud - gitweb
LU-12949 obdclass: don't extend timer if obd stops
[fs/lustre-release.git] / lustre / tests / recovery-small.sh
index 48de1b9..389d530 100755 (executable)
@@ -2878,6 +2878,32 @@ test_137() {
 }
 run_test 137 "late resend must be skipped if already applied"
 
+test_138() {
+       remote_mds_nodsh && skip "remote MDS with nodsh"
+       [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
+       [[ "$MDS1_VERSION" -ge $(version_code 2.12.59) ]] ||
+               skip "Need server version newer than 2.12.59"
+
+       zconf_umount_clients $CLIENTS $MOUNT
+
+#define OBD_FAIL_TGT_RECOVERY_CONNECT 0x724
+       #delay a first step of recovey when MDS waiting clients
+       #and failing to get osp logs
+       do_facet $SINGLEMDS $LCTL set_param fail_loc=0x724 fail_val=5
+
+       facet_failover $SINGLEMDS
+
+       #waiting failover and recovery timer
+       #the valuse is based on target_recovery_overseer() wait_event timeout
+       sleep 55
+       stop $SINGLEMDS || error "stop MDS failed"
+       do_facet $SINGLEMDS $LCTL set_param fail_loc=0
+       start $SINGLEMDS $(mdsdevname ${SINGLEMDS//mds/}) ||
+               error "start MDS failed"
+       zconf_mount_clients $CLIENTS $MOUNT
+}
+run_test 138 "Umount MDT during recovery"
+
 complete $SECONDS
 check_and_cleanup_lustre
 exit_status