From 4827d4e3a3712ca74dbe276aee4ba3dc6069a78b Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Thu, 10 Nov 2016 11:08:44 +0100 Subject: [PATCH] LU-8305 tests: strengthen fileset cleanup in sanity-sec Strengthen fileset cleanup on MGS side in test_27 of sanity-sec. Signed-off-by: Sebastien Buisson Change-Id: I36a79f54d56225bd92c4672c87ebe396a2856035 Reviewed-on: http://review.whamcloud.com/23693 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Kit Westneat Reviewed-by: Oleg Drokin --- lustre/tests/sanity-sec.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index a9a07e49..f229d19 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -875,11 +875,12 @@ wait_nm_sync() { local max_retries=20 local is_sync - local out1=$(do_facet mgs $LCTL get_param nodemap.${proc_param}) + local out1="" local out2 local mgs_ip=$(host_nids_address $mgs_HOST $NETTYPE | cut -d' ' -f1) local i + out1=$(do_facet mgs $LCTL get_param nodemap.${proc_param}) echo "On MGS ${mgs_ip}, ${proc_param} = $out1" # wait up to 10 seconds for other servers to sync with mgs @@ -1654,6 +1655,8 @@ run_test 26 "test transferring very large nodemap" test_27() { local subdir=c0dir local subsubdir=c0subdir + local fileset_on_mgs="" + local loop=0 nodemap_test_setup trap nodemap_test_cleanup EXIT @@ -1692,6 +1695,18 @@ test_27() { # remove fileset info from nodemap do_facet mgs $LCTL nodemap_set_fileset --name c0 --fileset \'\' || error "unable to delete fileset info on nodemap c0" + fileset_on_mgs=$(do_facet mgs $LCTL get_param nodemap.c0.fileset) + while [ "${fileset_on_mgs}" != "nodemap.c0.fileset=" ]; do + if [ $loop -eq 10 ]; then + error "On MGS, fileset cannnot be cleared" + break; + else + loop=$((loop+1)) + echo "On MGS, fileset is still ${fileset_on_mgs}, waiting..." + sleep 20; + fi + fileset_on_mgs=$(do_facet mgs $LCTL get_param nodemap.c0.fileset) + done do_facet mgs $LCTL set_param -P nodemap.c0.fileset=\'\' || error "unable to reset fileset info on nodemap c0" wait_nm_sync c0 fileset -- 1.8.3.1