Sanity-sec 75a initially sets up a trusted and tenant nodemap where
the trusted client creates the namespace necessary for the test. Among
other, the trusted client uses "echo" via "do_node" to redirect a
string into a file which is read later for verification.
However, because the "do_node" command uses "echo" with redirection
(">") and it is quoted incorrectly, the command only works if the
trusted client is the executing test client, i.e., equivalent to
client "client_arr[0]". This is not guaranteed in Auster and if the
"tenant" client is the client executing the test, its view on the
namespace is different as it is mounted on a different fileset,
causing the error that the directory was not found.
This patch fixes this, so the correct client is always running the
"do_node" command.
Fixes:
719f6763fe ("LU-18756 sec: add resource id check to oss and mds")
Test-Parameters: trivial testlist=sanity-sec env=ONLY=75a
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: I4be96839b93bbc43cc93bd4fd675339633bad247
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59935
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
local tenant_file=$1
local tenant_dir=$2
local offset=$3
- $run_as_trusted echo "abc" > ${fileset_subdir}/$tenant_file ||
+ $run_as_trusted "echo \"abc\" > ${fileset_subdir}/$tenant_file" ||
error "echo $tenant_file failed"
$run_as_trusted mkdir -p ${fileset_subdir}/$tenant_dir ||
error "mkdir $tenant_dir failed"
# setup testfiles and testdirectories. *_trusted files/dirs are
# world-accessible, but become inaccessible once the id_check is enabled
- $run_as_trusted echo "abc" > ${fileset_subdir}/$tfile_trusted ||
+ $run_as_trusted "echo \"abc\" > ${fileset_subdir}/$tfile_trusted" ||
error "echo $tfile_trusted failed"
$run_as_trusted mkdir ${fileset_subdir}/$tdir_trusted ||
error "mkdir $tdir_trusted failed"
error "chown ${tfile_tenant}_dom failed"
# create a file used in write tests
- $run_as_trusted echo "def" > ${fileset_subdir}/$tf_write ||
+ $run_as_trusted "echo \"def\" > ${fileset_subdir}/$tf_write" ||
error "echo $tf_write failed"
$run_as_trusted chown \
$((offset_start+ID0)):$((offset_start+ID0)) \