From 0cd77ae3ade8c303b4a9fb3e78c4cec65d6a9d07 Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Tue, 14 Jan 2020 20:51:55 +0900 Subject: [PATCH] LU-13133 tests: sanity-selinux test_21{a,b} sepol update We need to make sure MDS receives updated sepol info from MGS. In case of combined MGT/MDT, directly setting fileset on the node will mask llog-based info retrieval mechanism. So always use 'lctl set_param -P' to set sepol value. Lustre-change: https://review.whamcloud.com/37224 Lustre-commit: e32ca6e12edbd885838f8a12c0edd455b9ad7105 Test-Parameters: trivial Test-Parameters: clientselinux testlist=sanity-selinux Test-Parameters: clientselinux testlist=sanity-selinux Test-Parameters: clientselinux testlist=sanity-selinux Test-Parameters: clientselinux testlist=sanity-selinux Signed-off-by: Sebastien Buisson Change-Id: Iaf8ff13364b9ba5f5d8b733be0247d79e05a6b3d Reviewed-by: James Nunez Reviewed-by: Andreas Dilger Signed-off-by: Etienne AUJAMES Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50401 Tested-by: jenkins Tested-by: Maloo --- lustre/tests/sanity-selinux.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lustre/tests/sanity-selinux.sh b/lustre/tests/sanity-selinux.sh index d0cc3f7..7f2ea82 100755 --- a/lustre/tests/sanity-selinux.sh +++ b/lustre/tests/sanity-selinux.sh @@ -550,7 +550,6 @@ create_nodemap() { sleep 10 sepol=$(l_getsepol | cut -d':' -f2- | xargs) - do_facet mgs $LCTL set_param nodemap.$nm.sepol="$sepol" do_facet mgs $LCTL set_param -P nodemap.$nm.sepol="$sepol" check_nodemap $nm sepol $sepol @@ -561,6 +560,11 @@ remove_nodemap() { do_facet mgs $LCTL nodemap_del $nm + wait_update_facet --verbose mds1 \ + "$LCTL get_param nodemap.$nm.id 2>/dev/null | \ + grep -c $nm || true" 0 30 || + error "nodemap $nm could not be removed" + do_facet mgs $LCTL nodemap_activate 0 check_nodemap active x 0 @@ -614,7 +618,6 @@ test_21a() { # store wrong sepol in nodemap sepol="0:policy:0:0000000000000000000000000000000000000000000000000000000000000000" - do_facet mgs $LCTL set_param nodemap.c0.sepol="$sepol" do_facet mgs $LCTL set_param -P nodemap.c0.sepol="$sepol" check_nodemap c0 sepol $sepol @@ -728,7 +731,6 @@ test_21b() { # store wrong sepol in nodemap sepol="0:policy:0:0000000000000000000000000000000000000000000000000000000000000000" - do_facet mgs $LCTL set_param nodemap.c0.sepol="$sepol" do_facet mgs $LCTL set_param -P nodemap.c0.sepol="$sepol" check_nodemap c0 sepol $sepol @@ -753,7 +755,6 @@ test_21b() { # reset correct sepol sepol=$(l_getsepol | cut -d':' -f2- | xargs) - do_facet mgs $LCTL set_param nodemap.c0.sepol="$sepol" do_facet mgs $LCTL set_param -P nodemap.c0.sepol="$sepol" check_nodemap c0 sepol $sepol -- 1.8.3.1