mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 11:25:08 -02: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:
@@ -35,8 +35,24 @@ service_action() {
|
|||||||
fi
|
fi
|
||||||
# Allow supervisor time to cleanup child pids (ubuntu only)
|
# Allow supervisor time to cleanup child pids (ubuntu only)
|
||||||
if [[ ${svc} == supervisor* && ${1} == stop && -e /etc/debian_version ]]; then
|
if [[ ${svc} == supervisor* && ${1} == stop && -e /etc/debian_version ]]; then
|
||||||
echo "Waiting to allow supervisor time to cleanup ..."
|
S_PID=$(pidof -x supervisord)
|
||||||
sleep 5
|
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
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user