From 66f398201faaaa2b91e2a0b0741be940c896520b Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Wed, 1 Aug 2012 13:18:48 -0700 Subject: [PATCH] LU-1634 test: Check client only for version matching For reliability, we should check nidtbl versions on the client only to make sure the client is not notified if IR on the MGS is disabled. Otherwise, if the MGS can't respond while OST is restarting, the nidtbl version won't be updated and this will fail the test. Signed-off-by: Jinshan Xiong Change-Id: I903add4261f5fb133ae4ac170b10c0783c226e29 Reviewed-on: http://review.whamcloud.com/3511 Tested-by: Hudson Reviewed-by: Yu Jian Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/recovery-small.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index 0f379a7..c89558a 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -1276,19 +1276,30 @@ target_instance_match() test_100() { - do_facet mgs $LCTL list_param mgs.*.ir_timeout || - { skip "MGS without IR support"; return 0; } + do_facet mgs $LCTL list_param mgs.*.ir_timeout || + { skip "MGS without IR support"; return 0; } + + # MDT was just restarted in the previous test, make sure everything + # is all set. + local cnt=30 + while [ $cnt -gt 0 ]; do + nidtbl_versions_match && break + sleep 1 + cnt=$((cnt - 1)) + done + + # disable IR + set_ir_status disabled - # disable IR - set_ir_status disabled + local prev_ver=$(nidtbl_version_client client) local saved_FAILURE_MODE=$FAILURE_MODE [ $(facet_host mgs) = $(facet_host ost1) ] && FAILURE_MODE="SOFT" fail ost1 # valid check - nidtbl_versions_match && - error "version must differ due to IR disabled" + [ $(nidtbl_version_client client) -eq $prev_ver ] || + error "version must not change due to IR disabled" target_instance_match ost1 || error "instance mismatch" # restore env -- 1.8.3.1