Skip to content
Snippets Groups Projects
Commit 593e3da5 authored by Eric Cano's avatar Eric Cano Committed by Cedric CAFFY
Browse files

Cherry-picked de13ed76

Added error messages in case of problems for easier diagnosis.

Conflicts:
	continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctaeos-mgm.sh
parent ecc93af0
No related branches found
No related tags found
No related merge requests found
......@@ -17,9 +17,9 @@ if [ ! -e /etc/buildtreeRunner ]; then
fi
# Check that the /usr/bin/cta-fst-gcd executable has been installed
test -e /usr/bin/cta-fst-gcd && echo "/usr/bin/cta-fst-gcd EXISTS" || exit 1
test -f /usr/bin/cta-fst-gcd && echo "/usr/bin/cta-fst-gcd IS A REGULAR FILE" || exit 1
test -x /usr/bin/cta-fst-gcd && echo "/usr/bin/cta-fst-gcd IS EXECUTABLE" || exit 1
test -e /usr/bin/cta-fst-gcd || { echo "/usr/bin/cta-fst-gcd MISSING" ; exit 1; }
test -f /usr/bin/cta-fst-gcd || { echo "/usr/bin/cta-fst-gcd NO A REGULAR FILE"; exit 1; }
test -x /usr/bin/cta-fst-gcd && echo "/usr/bin/cta-fst-gcd exists as a regular, executable file: OK" || { echo "/usr/bin/cta-fst-gcd NOT EXECUTABLE"; exit 1; }
# create local users as the mgm is the only one doing the uid/user/group mapping in the full infrastructure
groupadd --gid 1100 eosusers
......@@ -169,11 +169,11 @@ else
/usr/bin/xrootd -n fst -c /etc/xrd.cf.fst -l /var/log/eos/xrdlog.fst -b -Rdaemon
runuser -u daemon setsid /usr/bin/cta-fst-gcd > /dev/null 2>&1 < /dev/null &
runuser -u daemon setsid /usr/bin/cta-fst-gcd < /dev/null &
fi
echo "Giving cta-fst-gcd 1 second to start logging"
sleep 1
echo "Giving cta-fst-gcd 3 second to start logging"
sleep 3
let EXPECTED_NB_STARTED_CTA_FST_GCD=NB_STARTED_CTA_FST_GCD+1
ACTUAL_NB_STARTED_CTA_FST_GCD=0
......@@ -181,6 +181,7 @@ if test -f /var/log/eos/fst/cta-fst-gcd.log; then
ACTUAL_NB_STARTED_CTA_FST_GCD=`grep "cta-fst-gcd started" /var/log/eos/fst/cta-fst-gcd.log | wc -l`
else
echo "/var/log/eos/fst/cta-fst-gcd.log DOES NOT EXIST"
ps auxf | grep gcd
exit 1
fi
if test ${EXPECTED_NB_STARTED_CTA_FST_GCD} = ${ACTUAL_NB_STARTED_CTA_FST_GCD}; then
......
......@@ -2,12 +2,17 @@
# make symbolic links to all CTA binaries.
echo Creating symlinks for CTA binaries.
echo "Creating symlinks for CTA binaries."
ln -s -v -t /usr/bin `find ${BUILDTREE_BASE}/${CTA_BUILDTREE_SUBDIR} -type f -executable | egrep -v '\.so(\.|$)' | egrep -v '\.sh$' | grep -v RPM/BUILD | grep -v CMake | grep -v CPack`
echo Creating symlinks for CTA libraries.
find ${BUILDTREE_BASE}/${CTA_BUILDTREE_SUBDIR} | grep '.so$' | xargs -itoto ln -s -v -t /usr/lib64 toto
echo Creating symlink for frontend configuration file.
ln -s -v -t /etc/cta `perl -e 'while (<>) { if (/cta_SOURCE_DIR:STATIC=(.*)/ ) { print $1."\n"; } }' < ${BUILDTREE_BASE}/${CTA_BUILDTREE_SUBDIR}/CMakeCache.txt`/xroot_plugins/cta-frontend-xrootd.conf
CTA_SOURCE_TREE=`perl -e 'while (<>) { if (/cta_SOURCE_DIR:STATIC=(.*)/ ) { print $1."\n"; } }' < ${BUILDTREE_BASE}/${CTA_BUILDTREE_SUBDIR}/CMakeCache.txt`
ln -s -v -t /etc/cta ${CTA_SOURCE_TREE}/xroot_plugins/cta-frontend-xrootd.conf
echo "Copying cta-fst-gcd (requires a different name)"
cp -v ${CTA_SOURCE_TREE}/python/eosfstgcd/ctafstgcd.py /usr/bin/cta-fst-gcd
if [[ -n "${EOS_BUILDTREE_SUBDIR}" ]]; then
echo Creating symlinks for EOS binaries.
ln -s -v -t /usr/bin `find ${BUILDTREE_BASE}/${EOS_BUILDTREE_SUBDIR} -type f -executable | egrep -v '\.so(\.|$)' | egrep -v '\.sh$' | grep -v RPM/BUILD | grep -v CMake | grep -v CPack`
......@@ -18,3 +23,4 @@ if [[ -n "${EOS_BUILDTREE_SUBDIR}" ]]; then
mkdir /var/eos{,/wfe{,/bash},ns-queue{,/default}}
chown -R daemon.daemon /var/log/eos /var/eos
fi
echo "Symlinks creation compete."
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