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

ctafrontend can now run with or without systemd...

If CI passes...
parent aad3eaf1
No related branches found
No related tags found
No related merge requests found
......@@ -39,10 +39,18 @@ echo OK
echo "Generating core file in /var/log/cta directory so that those are available as artifacts"
echo '/var/log/cta/core_%e.%p' > /proc/sys/kernel/core_pattern
echo "Launching frontend"
runuser --shell='/bin/bash' --session-command='cd ~cta; xrootd -l /var/log/cta-frontend-xrootd.log -k fifo -n cta -c /etc/cta/cta-frontend-xrootd.conf -I v4' cta
echo "ctafrontend died"
echo "analysing core file if any"
/opt/run/bin/ctafrontend_bt.sh
sleep infinity
if [ "-${CI_CONTEXT}-" == '-nosystemd-' ]; then
# systemd is not available
runuser --shell='/bin/bash' --session-command='cd ~cta; xrootd -l /var/log/cta-frontend-xrootd.log -k fifo -n cta -c /etc/cta/cta-frontend-xrootd.conf -I v4' cta
echo "ctafrontend died"
echo "analysing core file if any"
/opt/run/bin/ctafrontend_bt.sh
sleep infinity
else
# systemd is available
echo "Launching frontend with systemd:"
systemctl start cta-frontend
echo "Status is now:"
systemctl status cta-frontend
fi
......@@ -33,6 +33,8 @@ spec:
key: subdir
- name: TERM
value: "xterm"
- name: CI_CONTEXT
value: "nosystemd"
command: ['/opt/run/bin/ctafrontend.sh']
args: ["none"]
volumeMounts:
......
......@@ -59,6 +59,9 @@ ctacliIP=`kubectl --namespace ${NAMESPACE} describe pod ctacli | grep IP | sed -
echo "Preparing CTA configuration for tests"
kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta-catalogue.conf --hostname ${ctacliIP} -c "docker cli"
# to allow client connecting to dual stack IPv6/IPv4 xrootd server
# otherwise only use IPv4 by adding '-I v4' to ExecStart line in /etc/systemd/system/cta-frontend.service
kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta-catalogue.conf --hostname [::ffff:${ctacliIP}] -c "docker cli"
kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-user-create /etc/cta/cta-catalogue.conf --username ctaadmin1 -c "docker cli"
kubectl --namespace ${NAMESPACE} exec ctacli -- cta-admin logicallibrary add \
--name ${LIBRARYNAME} \
......@@ -131,6 +134,7 @@ 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-admin adminhost add --name ${clientIP} --comment "for the super client"
kubectl --namespace ${NAMESPACE} exec ctacli -- cta-admin adminhost add --name [::ffff:${clientIP}] --comment "for the super client"
kubectl --namespace ${NAMESPACE} exec ctacli -- cta-admin 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.
Please register or to comment