Commit 82f7d648 authored by fwinkler's avatar fwinkler

Fixed check for PIKA package in case many throughput jobs start at the same time.

parent f1e813c1
......@@ -76,22 +76,26 @@ if [ ! -f "/etc/cron.daily/pika_logrotate.sh" ]; then
cp ${PIKA_ROOT}/daemon/logrotate/pika_logrotate.sh /etc/cron.daily >> $DEBUG_PATH 2>&1
fi
# (5.2) Wait until PIKA python is available
# (5.2) Wait until PIKA package is available
if [ "$have_setup_lock" = false ] && [ -d "${lock_collectd}" ]; then
echo -e "\nWait until PIKA package is available..." >> $DEBUG_PATH 2>&1
while [ -d "${lock_collectd}" ]; do
# wait until lock is free
sleep 1
done
fi
echo -e "\nCheck PIKA python3:" >> $DEBUG_PATH 2>&1
pika_python_bin=${PYTHON_ROOT}/bin/python3
if [ -x "$(command -v ${pika_python_bin})" ]; then
echo -e Using ${pika_python_bin} >> $DEBUG_PATH 2>&1
pika_python_version=$(${pika_python_bin} -V)
echo -e ${pika_python_version} >> $DEBUG_PATH 2>&1
else
# sleep until we have a python (at most 5 seconds)
for i in 1 2 3 4 5 ; do
sleep 1
if [ -x "$(command -v ${pika_python_bin})" ]; then
echo -e "PIKA python3 is now available (${pika_python_bin})" >> $DEBUG_PATH 2>&1
break
fi
done
echo -e "Error: PIKA python3 is NOT available!" >> $DEBUG_PATH 2>&1
fi
####################################
# (6) Determine master node
if [ -x "$(command -v ${PYTHON_ROOT}/bin/nodeset)" ]; then
......
Markdown is supported
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