Commit b1d45cbb authored by Julien Leduc's avatar Julien Leduc
Browse files

Adding systemd support for the eos instance

parent 1781c337
......@@ -109,20 +109,38 @@ echo
echo "Limits summary for user daemon:"
sudo -u daemon bash -c 'ulimit -a'
# Using jemalloc as specified in
# it-puppet-module-eos:
# code/templates/etc_sysconfig_mgm.erb
# code/templates/etc_sysconfig_mgm_env.erb
# code/templates/etc_sysconfig_fst.erb
# code/templates/etc_sysconfig_fst_env.erb
test -e /usr/lib64/libjemalloc.so.1 && echo "Using jemalloc for EOS processes"
test -e /usr/lib64/libjemalloc.so.1 && export LD_PRELOAD=/usr/lib64/libjemalloc.so.1
# start and setup eos for xrdcp to the ${CTA_TEST_DIR}
if [ "-${CI_CONTEXT}-" == '-systemd-' ]; then
# generate eos_env file for systemd
cat /etc/sysconfig/eos | sed -e 's/^export\s*//' > /etc/sysconfig/eos_env
test -e /usr/lib64/libjemalloc.so.1 && echo LD_PRELOAD=/usr/lib64/libjemalloc.so.1 >> /etc/sysconfig/eos_env
# start eos
systemctl start eos@mq
systemctl start eos@mgm
systemctl start eos@fst
echo -n "Waiting for eos to start"
for ((i=1;i<20;i++)); do systemctl status eos@{mq,mgm,fst} &>/dev/null && break; sleep 1; echo -n .; done
systemctl status eos@{mq,mgm,fst} &>/dev/null && echo OK || echo FAILED
systemctl status eos@{mq,mgm,fst}
else
# Using jemalloc as specified in
# it-puppet-module-eos:
# code/templates/etc_sysconfig_mgm.erb
# code/templates/etc_sysconfig_mgm_env.erb
# code/templates/etc_sysconfig_fst.erb
# code/templates/etc_sysconfig_fst_env.erb
test -e /usr/lib64/libjemalloc.so.1 && echo "Using jemalloc for EOS processes"
test -e /usr/lib64/libjemalloc.so.1 && export LD_PRELOAD=/usr/lib64/libjemalloc.so.1
# start and setup eos for xrdcp to the ${CTA_TEST_DIR}
#/etc/init.d/eos start
/usr/bin/xrootd -n mq -c /etc/xrd.cf.mq -l /var/log/eos/xrdlog.mq -b -Rdaemon
/usr/bin/xrootd -n mgm -c /etc/xrd.cf.mgm -m -l /var/log/eos/xrdlog.mgm -b -Rdaemon
/usr/bin/xrootd -n fst -c /etc/xrd.cf.fst -l /var/log/eos/xrdlog.fst -b -Rdaemon
fi
eos vid enable krb5
eos vid enable sss
......@@ -184,5 +202,6 @@ test -e /usr/lib64/libjemalloc.so.1 && export LD_PRELOAD=/usr/lib64/libjemalloc.
touch /EOSOK
/bin/bash
if [ "-${CI_CONTEXT}-" == '-nosystemd-' ]; then
/bin/bash
fi
......@@ -38,3 +38,10 @@ if [ $(echo ${MY_CONTAINER} | grep -s '^taped') ]; then
echo "Running /opt/run/bin/taped.sh" &> ${logfile}
/opt/run/bin/taped.sh 2>&1 | tee -a ${logfile}
fi
if [ $(echo ${MY_NAME} | grep -s '^ctaeos') ]; then
echo "Running /shared/ctaeos-mgm.sh" &> ${logfile}
/opt/run/bin/ctaeos-mgm.sh 2>&1 | tee -a ${logfile}
fi
echo "DONE" >> ${logfile}
......@@ -141,7 +141,7 @@ fi
if [ $usesystemd == 1 ] ; then
echo "Using systemd to start services on some pods"
for podname in ctafrontend tpsrv; do
for podname in ctafrontend tpsrv ctaeos; do
sed -i "/^\ *command:/d" ${poddir}/pod-${podname}*.yaml
done
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment