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

Adding systemd support for the eos instance

parent f1f5523c
No related branches found
No related tags found
No related merge requests found
...@@ -109,20 +109,38 @@ echo ...@@ -109,20 +109,38 @@ echo
echo "Limits summary for user daemon:" echo "Limits summary for user daemon:"
sudo -u daemon bash -c 'ulimit -a' sudo -u daemon bash -c 'ulimit -a'
# Using jemalloc as specified in if [ "-${CI_CONTEXT}-" == '-systemd-' ]; then
# it-puppet-module-eos: # generate eos_env file for systemd
# code/templates/etc_sysconfig_mgm.erb cat /etc/sysconfig/eos | sed -e 's/^export\s*//' > /etc/sysconfig/eos_env
# code/templates/etc_sysconfig_mgm_env.erb test -e /usr/lib64/libjemalloc.so.1 && echo LD_PRELOAD=/usr/lib64/libjemalloc.so.1 >> /etc/sysconfig/eos_env
# code/templates/etc_sysconfig_fst.erb
# code/templates/etc_sysconfig_fst_env.erb # start eos
test -e /usr/lib64/libjemalloc.so.1 && echo "Using jemalloc for EOS processes" systemctl start eos@mq
test -e /usr/lib64/libjemalloc.so.1 && export LD_PRELOAD=/usr/lib64/libjemalloc.so.1 systemctl start eos@mgm
systemctl start eos@fst
# start and setup eos for xrdcp to the ${CTA_TEST_DIR}
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 #/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 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 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 /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 krb5
eos vid enable sss eos vid enable sss
...@@ -184,5 +202,6 @@ test -e /usr/lib64/libjemalloc.so.1 && export LD_PRELOAD=/usr/lib64/libjemalloc. ...@@ -184,5 +202,6 @@ test -e /usr/lib64/libjemalloc.so.1 && export LD_PRELOAD=/usr/lib64/libjemalloc.
touch /EOSOK touch /EOSOK
/bin/bash if [ "-${CI_CONTEXT}-" == '-nosystemd-' ]; then
/bin/bash
fi
...@@ -38,3 +38,10 @@ if [ $(echo ${MY_CONTAINER} | grep -s '^taped') ]; then ...@@ -38,3 +38,10 @@ if [ $(echo ${MY_CONTAINER} | grep -s '^taped') ]; then
echo "Running /opt/run/bin/taped.sh" &> ${logfile} echo "Running /opt/run/bin/taped.sh" &> ${logfile}
/opt/run/bin/taped.sh 2>&1 | tee -a ${logfile} /opt/run/bin/taped.sh 2>&1 | tee -a ${logfile}
fi 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 ...@@ -141,7 +141,7 @@ fi
if [ $usesystemd == 1 ] ; then if [ $usesystemd == 1 ] ; then
echo "Using systemd to start services on some pods" 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 sed -i "/^\ *command:/d" ${poddir}/pod-${podname}*.yaml
done done
fi fi
......
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