Commit 941f58f2 authored by Alain Takoudjou's avatar Alain Takoudjou

gitlab: ensure all processes killed when resilient restore script exit

parent c6119962
......@@ -345,7 +345,7 @@ md5sum = 4e1ced687a86e4cfff2dde91237e3942
[template-gitlab-resiliency-restore.sh.in]
<= download-template
md5sum = 420d999daae050351a51487b9d2f8fe0
md5sum = 590fcadf26085fdd17487175bc0a469d
[unicorn.rb.in]
<= download-template
......
......@@ -69,7 +69,7 @@ trap "echo 'kill $postgres_pid" EXIT TERM INT
echo "Starting Redis server..."
$redis_executable &
redis_pid=$!
trap "kill $redis_pid" EXIT TERM INT
trap "kill $postgres_pid $redis_pid" EXIT TERM INT
echo "[OK]"
echo "Restoring gitlab data..."
......@@ -86,11 +86,11 @@ $promise_check/gitlab-app
echo "Starting Unicorn to check gitlab-shell promise..."
$unicorn_script &
unicorn_pid=$!
trap "kill $unicorn_pid" EXIT TERM INT
trap "kill $postgres_pid $redis_pid $unicorn_pid" EXIT TERM INT
sleep 60
if [ -s "$run_location/unicorn.pid" ]; then
unicorn_ppid=$(head -n 1 $run_location/unicorn.pid) > /dev/null 2>&1
trap "kill $unicorn_ppid" EXIT TERM INT
trap "kill $postgres_pid $redis_pid $unicorn_ppid" EXIT TERM INT
fi
$promise_check/gitlab-shell
......
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