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 <kit.westneat@gmail.com>
Change-Id: If8d92d20aaa8cf75e3d443d1a81ff2f201d118cc
Reviewed-on: http://review.whamcloud.com/22750
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
local tmpfile=$(mktemp)
local tmpfile2=$(mktemp)
local subdir=c0dir
local tmpfile=$(mktemp)
local tmpfile2=$(mktemp)
local subdir=c0dir
nodemap_version_check || return 0
nodemap_version_check || return 0
- 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
trap nodemap_test_cleanup EXIT