mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Fix supervisor restart behavior for ubuntu, and adjust timeouts *way*
down on when supervisor can harikiri it's child processes
This commit is contained in:
parent
0589f5ad06
commit
e4936e4b80
@ -35,8 +35,24 @@ service_action() {
|
||||
fi
|
||||
# Allow supervisor time to cleanup child pids (ubuntu only)
|
||||
if [[ ${svc} == supervisor* && ${1} == stop && -e /etc/debian_version ]]; then
|
||||
echo "Waiting to allow supervisor time to cleanup ..."
|
||||
sleep 5
|
||||
S_PID=$(pidof -x supervisord)
|
||||
echo "Waiting to allow supervisor time to cleanup ... pid ${S_PID}"
|
||||
if [ "${S_PID}" ]; then
|
||||
i=0
|
||||
while kill -0 "${S_PID}" 2> /dev/null; do
|
||||
if [ $i = '60' ]; then
|
||||
break;
|
||||
else
|
||||
if [ $i == '0' ]; then
|
||||
echo -n " ... waiting"
|
||||
else
|
||||
echo -n "."
|
||||
fi
|
||||
i=$(($i+1))
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user