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

Adding helper functions to allow execution of admin commands (as `ctaadmin2`).

parent ab5297ea
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ echo " Archiving 100 file of 1kB each"
echo " Archiving file: xrdcp as user1"
echo " Retrieving it as poweruser1"
kubectl -n ${NAMESPACE} cp client_ar.sh client:/root/client_ar.sh
kubectl -n ${NAMESPACE} cp client_helper.sh client:/root/client_helper.sh
kubectl -n ${NAMESPACE} exec client -- bash /root/client_ar.sh -n 100 -s 1 -p 4 || exit 1
exit 0
CTAADMIN_USER="ctaadmin2"
USER="user1"
die() {
echo "$@" 1>&2
exit 1
}
admin_cta() {
KRB5CCNAME=/tmp/${CTAADMIN_USER}/krb5cc_0 cta $@
}
admin_klist() {
KRB5CCNAME=/tmp/${CTAADMIN_USER}/krb5cc_0 klist
}
admin_kinit() {
KRB5CCNAME=/tmp/${CTAADMIN_USER}/krb5cc_0 kinit -kt /root/${CTAADMIN_USER}.keytab ${CTAADMIN_USER}@TEST.CTA
admin_klist
}
admin_kdestroy() {
KRB5CCNAME=/tmp/${CTAADMIN_USER}/krb5cc_0 kdestroy
admin_klist
}
......@@ -124,7 +124,13 @@ echo "Setting drive up: ${DRIVENAMES[${driveslot}]}"
# A bit of reporting
echo "EOS server version is used:"
kubectl --namespace ${NAMESPACE} exec ctaeos -- rpm -qa|grep eos-server
echo "Information about the testing file:"
echo "********"
kubectl --namespace ${NAMESPACE} exec ctaeos -- eos attr ls /eos/ctaeos/cta/${TEST_FILE_NAME}
kubectl --namespace ${NAMESPACE} exec ctaeos -- eos info /eos/ctaeos/cta/${TEST_FILE_NAME}
# Super client capabilities
echo "Adding super client capabilities"
clientIP=`kubectl --namespace ${NAMESPACE} describe pod client | grep IP | sed -E 's/IP:[[:space:]]+//'`
kubectl --namespace ${NAMESPACE} exec ctacli -- cta adminhost add --name ${clientIP} --comment "for the super client"
kubectl --namespace ${NAMESPACE} exec ctacli -- cta admin add --username ctaadmin2 --comment "ctaadmin2"
kubectl --namespace=${NAMESPACE} exec kdc cat /root/ctaadmin2.keytab | kubectl --namespace=${NAMESPACE} exec -i client -- bash -c "cat > /root/ctaadmin2.keytab; mkdir -p /tmp/ctaadmin2"
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