fix for systemd based rabbitmq guest
Upstart seemed to be providing output from rabbitmqctl, which we were depending on to tell whether rabbit was up, but systemd does not do this. Changing the status check to use rabbitmqctl instead so that status check works for both systemd and upstart. Also moved the command to enable the management console to after rabbitmq startup since the command was failing if rabbit was not up. Change-Id: I5f0c277a3201911b0bc998ff7f17d526dab6b33e
This commit is contained in:
parent
74124f363a
commit
d372f0125f
|
@ -51,15 +51,15 @@ rabbitmq hard nofile 65536
|
|||
rabbitmq soft nofile 65536
|
||||
EOF
|
||||
|
||||
rabbitmq-plugins enable rabbitmq_management
|
||||
|
||||
update-rc.d rabbitmq-server enable
|
||||
|
||||
while [ ! -z "$(service rabbitmq-server status | grep 'nodedown')" ]; do
|
||||
while [ ! -z "$(rabbitmqctl status 2>&1 | grep 'nodedown')" ]; do
|
||||
service rabbitmq-server start
|
||||
sleep 5
|
||||
done
|
||||
|
||||
rabbitmq-plugins enable rabbitmq_management
|
||||
|
||||
# Create monitoring user
|
||||
rabbitmqctl add_user cue_monitor "{{cluster_id}}"
|
||||
rabbitmqctl set_user_tags cue_monitor monitoring
|
||||
|
|
Loading…
Reference in New Issue