From 1a92e40bd05c05820c902ce4ee738212a308d9e2 Mon Sep 17 00:00:00 2001 From: Kit Westneat Date: Mon, 26 Sep 2016 22:30:02 -0400 Subject: [PATCH] LU-8340 tests: in sanity-sec 25 client nodemap must be admin If the ENABLE_QUOTA is set, then cleanup_and_setup_lustre will use the client node to setup quota, which requires admin privileges on the nodemap. This patch enables admin privileges on all clients before calling cleanup_and_setup_lustre. Test-Parameters: envdefinitions=ENABLE_QUOTA=yes Signed-off-by: Kit Westneat Change-Id: If8d92d20aaa8cf75e3d443d1a81ff2f201d118cc Reviewed-on: http://review.whamcloud.com/22750 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Niu Yawei Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/sanity-sec.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 289711a..a9a07e49 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -1581,6 +1581,7 @@ test_25() { local tmpfile=$(mktemp) local tmpfile2=$(mktemp) local subdir=c0dir + local client nodemap_version_check || return 0 @@ -1590,8 +1591,16 @@ test_25() { nodemap_test_setup - echo c* nodemaps: - do_facet mgs $LCTL get_param nodemap.c*.* + # enable trusted/admin for setquota call in cleanup_and_setup_lustre() + i=0 + for client in $clients; do + do_facet mgs $LCTL nodemap_modify --name c${i} \ + --property admin --value 1 + do_facet mgs $LCTL nodemap_modify --name c${i} \ + --property trusted --value 1 + ((i++)) + done + wait_nm_sync c$((i - 1)) trusted_nodemap trap nodemap_test_cleanup EXIT -- 1.8.3.1