> On March 9, 2016, 9:03 p.m., Ezra Silvera wrote: > > src/docker/docker.cpp, lines 304-305 > > <https://reviews.apache.org/r/43093/diff/3/?file=1233160#file1233160line304> > > > > Please note that a container can be attached to more then one network! > > In that case HostConfig.NetworkMode will contain the first NW the container > > was attached two. The desired IP, however, might be the one on a different > > NW in the NetworkSettings.Networks array.
FYI, the work for the issue that this patch originally addressed are now being done in https://reviews.apache.org/r/44531/. In what way (other than the docker overlay network, as mesos doesn't support user defined networks yet) are you able to get a container to connect to more than one network? In my experience, docker run has always clobbered the former "net" parameter names with the latter ones. I don't have a way to test the overlay network at the moment, but would be happy to analyze the inspect of a container you are saying will fail with the linked patch. - Travis ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43093/#review122802 ----------------------------------------------------------- On Feb. 17, 2016, 10:52 p.m., Travis Hegner wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43093/ > ----------------------------------------------------------- > > (Updated Feb. 17, 2016, 10:52 p.m.) > > > Review request for mesos, haosdent huang, Kapil Arya, and Timothy Chen. > > > Bugs: MESOS-4370 > https://issues.apache.org/jira/browse/MESOS-4370 > > > Repository: mesos > > > Description > ------- > > Fixes [MESOS-4370] > > > Diffs > ----- > > src/docker/docker.cpp b4b8d3e > > Diff: https://reviews.apache.org/r/43093/diff/ > > > Testing > ------- > > This patch will first query the docker API for the HostConfig.NetworkMode, > which is populated with the network name. (Essentially what was passed in > --net <name> to the docker run command). This name is then used as a key in > NetworkSettings.Networks.<name>.IPAddress to get the IP address that is > currently in use by the container. > > It appears that even though the docker API has been set up to allow for > multiple networks, our testing has indicated that it's still only applying > one network to the container (the last one via the --net argument on the run > line). I can only speculate that the docker API will change again in the near > future, but I can't speculate how, so at least this fixes the problem as it > stands right now. > > Tested and working with Docker 1.9.1, Mesos 0.27.0, on Ubuntu 14.04. > > > Thanks, > > Travis Hegner > >
