Open Suvitruf opened 8 years ago
we also had issues because of the hardcoded eth0 logic in both initd/upstart init scripts (in our case actually it works on all hosts that do not have an eth0 .. and the ones that have, it's not THE expected interface , and bam, consul agent listens on a non-sense, non-configured iface)
the proper fix for this is to make a variable like consul_bind_iface
to be used instead of all 'eth0' occurrences ...
When I'm trying to create consul cluster on Soft Layer, it works fine 'cause private network binds to eth0.
But, for example, at Diagital Ocean private network binds to eth1 interface.
So, I see something like 10.12.0.9 in address when using
consul members
.Mb change
bind_addr
declaration in consul.json.j2 to:"bind_addr": {% for host in consul_servers %}{% if host in ansible_all_ipv4_addresses %}"{{host}}"{% endif %}{% endfor %},
?