mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
configure-rabbitmq: Use rabbitmqctl await_online_nodes.
rabbitmqctl ping only checks that the Erlang process is registered with epmd. There’s a window after that where the rabbit app is still starting inside it. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Alex Vandiver
parent
52d363cada
commit
84e91a6e33
@@ -19,10 +19,14 @@ RABBITMQ_PASSWORD=$("$(dirname "$0")/../get-django-setting" RABBITMQ_PASSWORD)
|
|||||||
|
|
||||||
# Wait for RabbitMQ to start up
|
# Wait for RabbitMQ to start up
|
||||||
retries=29
|
retries=29
|
||||||
while ! "${sudo[@]}" rabbitmqctl ping -q 2>/dev/null; do
|
# Could use rabbitmqctl await_startup when we upgrade to 3.7.11.
|
||||||
|
while ! "${sudo[@]}" rabbitmqctl -q await_online_nodes 1 2>/dev/null; do
|
||||||
|
if ((retries == 29)); then
|
||||||
|
echo "Waiting for RabbitMQ to start up..."
|
||||||
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
if ! ((retries -= 1)); then
|
if ! ((retries -= 1)); then
|
||||||
"${sudo[@]}" rabbitmqctl ping -q
|
"${sudo[@]}" rabbitmqctl -q await_online_nodes 1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user