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 <jinshan.xiong@intel.com>
Change-Id: I903add4261f5fb133ae4ac170b10c0783c226e29
Reviewed-on: http://review.whamcloud.com/3511
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
- 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
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
target_instance_match ost1 || error "instance mismatch"
# restore env