Skip to content
Snippets Groups Projects
Commit a92c3a8e authored by Julien Leduc's avatar Julien Leduc
Browse files

Archive-retrieve test working on client pod

adding all the missing bits to allow the simple systemtest to run on the client pod:
- add user `daemon` to sudoer in eos so that we can xrdfs prepare as a `powerusers` user
- add the `powerusers` group mount rule in cta
- add the missing bits in client_test.sh
parent e7722e13
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,10 @@ echo -n '0 u:daemon g:daemon n:ctaeos+ N:6361884315374059521 c:1481241620 e:0 f:
eos vid enable unix
EOS_MGM_URL="root://${eoshost}" eosfstregister -r /fst default:1
# Add user daemon to sudoers this is to allow recalls for the moment using this command
# XrdSecPROTOCOL=sss xrdfs ctaeos prepare -s "/eos/ctaeos/cta/${TEST_FILE_NAME}?eos.ruid=12001&eos.rgid=1200"
vid set membership 2 +sudo
eos node set ${eoshost} on
eos space set default on
eos attr -r set default=replica /eos
......
......@@ -4,6 +4,7 @@
EOSINSTANCE=ctaeos
TEST_FILE_NAME=`uuidgen`
echo "xrdcp /etc/group root://localhost//eos/ctaeos/cta/${TEST_FILE_NAME}"
xrdcp /etc/group root://${EOSINSTANCE}//eos/ctaeos/cta/${TEST_FILE_NAME}
......@@ -38,6 +39,30 @@ echo "Information about the testing file without disk replica"
eos root://${EOSINSTANCE} info /eos/ctaeos/cta/${TEST_FILE_NAME}
echo
echo "trigger EOS retrive workflow"
echo "xrdfs localhost prepare -s /eos/ctaeos/cta/${TEST_FILE_NAME}"
echo "XrdSecPROTOCOL=sss xrdfs ${EOSINSTANCE} prepare -s \"/eos/ctaeos/cta/${TEST_FILE_NAME}?eos.ruid=12001&eos.rgid=1200\""
# XrdSecPROTOCOL=sss xrdfs ${EOSINSTANCE} prepare -s /eos/ctaeos/cta/${TEST_FILE_NAME}
XrdSecPROTOCOL=sss xrdfs ctaeos prepare -s "/eos/ctaeos/cta/${TEST_FILE_NAME}?eos.ruid=0&eos.rgid=0"
XrdSecPROTOCOL=sss xrdfs ${EOSINSTANCE} prepare -s "/eos/ctaeos/cta/${TEST_FILE_NAME}?eos.ruid=12001&eos.rgid=1200"
# Wait for the copy to appear on disk
SECONDS_PASSED=0
WAIT_FOR_RETRIEVED_FILE_TIMEOUT=90
while test 0 = `eos root://${EOSINSTANCE} info /eos/ctaeos/cta/${TEST_FILE_NAME} | awk '{print $4;}' | grep -F "default.0" | wc -l`; do
echo "Waiting for file to be retrieved from tape: Seconds passed = ${SECONDS_PASSED}"
sleep 1
let SECONDS_PASSED=SECONDS_PASSED+1
if test ${SECONDS_PASSED} == ${WAIT_FOR_RETRIEVED_FILE_TIMEOUT}; then
echo "Timed out after ${WAIT_FOR_RETRIEVED_FILE_TIMEOUT} seconds waiting for file to be retrieved from tape"
exit 1
fi
done
echo
echo "FILE RETRIEVED FROM DISK"
echo
echo "Information about the testing file:"
echo "********"
eos root://${EOSINSTANCE} attr ls /eos/ctaeos/cta/${TEST_FILE_NAME}
eos root://${EOSINSTANCE} info /eos/ctaeos/cta/${TEST_FILE_NAME}
......@@ -104,11 +104,18 @@ echo "Preparing CTA for tests"
--instance ${EOSINSTANCE} \
--name adm \
--mountpolicy ctasystest --comment "ctasystest"
# group mount rule for eosusers group members: user1 and user2 as defined on the ctaeos mgm
###
# This rule exists to allow users from eosusers group to migrate files to tapes
kubectl --namespace ${NAMESPACE} exec ctacli -- cta groupmountrule add \
--instance ${EOSINSTANCE} \
--name eosusers \
--mountpolicy ctasystest --comment "ctasystest"
###
# This rule exists to allow users from powerusers group to recall files from tapes
kubectl --namespace ${NAMESPACE} exec ctacli -- cta groupmountrule add \
--instance ${EOSINSTANCE} \
--name powerusers \
--mountpolicy ctasystest --comment "ctasystest"
kubectl --namespace ${NAMESPACE} exec ctacli -- cta drive up ${DRIVENAMES[${driveslot}]}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment