static ipv4 addresses not working when using overlay network and swarm mode (v1.13+) #31860
Labels
area/networking
area/swarm
kind/enhancement
Enhancements are not bugs or new features but can improve usability or performance.
Dear all,
my docker swarm mode cluster keeps ignoring "ipv4_address:" definitions set in version-3 compose files. I try to get a consul cluster running on my swarm mode cluster. Consul needs to advertise an ip address, and you also need to define an ip address for the "consul workers" to join ("-retry-join="). With docker ignoring the fixed ipv4 addresses I set in the compose definition, you end up with consul containers advertising ip addresses they do not own. This will never lead to a working consul cluster.
Steps to reproduce the issue:
Describe the results you received:
The network
px-consul-net
is being created as expected, it comes up with the defined address range.The 3 consul containers are created and start up as well.
Unfortunately they come up with random ipv4 addresses from the range defined in the compose file. - Not with the addresses I set in the "services" section.
As the result, I get f.e. one consul container with the IP 10.0.111.7, but advertising the ip 10.0.111.3; a second consul container with the IP 10.0.111.5, advertising the IP 10.0.111.5 (accidentally the right one) and a 3rd consul container with the IP 10.0.111.3, advertising the IP 10.0.111.4. This will never work.
Any
-retry-join=<root agent ip>
statement in the service definition file will never work.Describe the results you expected:
I expected each of the 3 consul containers coming up with the ipv4 address I set in the service definition file, for example:
Additional information you deem important (e.g. issue happens only occasionally):
Happens each and every time I tried. Upgrading from docker engine v1.13.1 to the latest available did not help. I also installed all patches for the host system (
apt-get update
andapt-get upgrade
followed by a system reboot). Did not help. Behaviour did not change.Output of
docker version
:I already tried this with docker engine 1.13.1. - Behaviour regarding the randomness of the
ipv4_address:
statement was the same.Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
All nodes of this swarm are Azure VMs, size DS3_v2, running Ubuntu Linux 16.04.2 LTS:
Output of
uname -a
:Output of
lsb_release -a
:Please investigate. This is really annoying. Thank you very much!
console_output_consul.txt
docker-stack-deploy.txt
The text was updated successfully, but these errors were encountered: