From: Sebastien Buisson Date: Tue, 19 Sep 2023 07:03:20 +0000 (+0200) Subject: LU-17129 tests: cleanup fileset info on nodemaps X-Git-Tag: 2.15.59~95 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F08%2F52408%2F4;p=fs%2Flustre-release.git LU-17129 tests: cleanup fileset info on nodemaps In sanity-sec, fileset info added to nodemaps via 'set_param -P' must be removed afterwards with 'set_param -P -d', otherwise those commands will remain in the llogs. Test-Parameters: trivial mdscount=2 mdtcount=4 testlist=sanity-sec env=ONLY=27 Signed-off-by: Sebastien Buisson Change-Id: I75bd0dc263f71c7f5d9ece028cc038eb1f2ca9a4 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52408 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Aurelien Degremont Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 05a12a4..3a27042 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -2055,6 +2055,8 @@ nodemap_exercise_fileset() { do_facet mgs $LCTL set_param -P nodemap.${nm}.fileset=clear || error "unable to reset fileset info on $nm nodemap" wait_nm_sync $nm fileset "nodemap.${nm}.fileset=" + do_facet mgs $LCTL set_param -P -d nodemap.${nm}.fileset || + error "unable to remove fileset rule on $nm nodemap" # re-mount client zconf_umount_clients ${clients_arr[0]} $MOUNT || @@ -2099,6 +2101,13 @@ test_27a() { [ "$MDS1_VERSION" -lt $(version_code 2.11.50) ] && skip "Need MDS >= 2.11.50" + # if servers run on the same node, it is impossible to tell if they get + # synced with the mgs, so this test needs to be skipped + if [ $(facet_active_host mgs) == $(facet_active_host mds) ] && + [ $(facet_active_host mgs) == $(facet_active_host ost1) ]; then + skip "local mode not supported" + fi + for nm in "default" "c0"; do local subdir="subdir_${nm}" local subsubdir="subsubdir_${nm}" @@ -2119,6 +2128,13 @@ test_27b() { #LU-10703 skip "Need MDS >= 2.11.50" [[ $MDSCOUNT -lt 2 ]] && skip "needs >= 2 MDTs" + # if servers run on the same node, it is impossible to tell if they get + # synced with the mgs, so this test needs to be skipped + if [ $(facet_active_host mgs) == $(facet_active_host mds) ] && + [ $(facet_active_host mgs) == $(facet_active_host ost1) ]; then + skip "local mode not supported" + fi + nodemap_test_setup trap nodemap_test_cleanup EXIT @@ -2145,6 +2161,8 @@ test_27b() { #LU-10703 $LCTL get_param -n nodemap.nm$i.fileset) [ "$fileset" = "/dir$i" ] || error "nm$i.fileset $fileset != /dir$i on mds$i" + do_facet mgs $LCTL set_param -P -d nodemap.nm$i.fileset || + error "unable to remove fileset rule for nm$i nodemap" do_facet mgs $LCTL nodemap_del nm$i || error "delete nodemap nm$i failed" done