Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/publish-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PUBLISH_NODE_TTL=${PUBLISH_NODE_TTL:-120}
PUBLISH_NODE_POLL=${PUBLISH_NODE_POLL:-60s}

NODE=$(cat /var/lib/rabbitmq/nodename)
HOST_IP=${HOST_IP:-$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')}
HOST_IP=${HOST_IP:-$(hostname -I | tr -d '[[:space:]]')}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of using hostname. However, should we just pick the first host
HOST_IP=${HOST_IP:$(hostname -I | awk '{print $1}')} ?

The only case I could see multiple IP address is when we use --net=host. Even in that case, we might just pick the first IP in the list by default. Thoughts ?


while supervisorctl status rabbitmq-server | grep 'RUNNING'
do
Expand Down