> On March 9, 2016, 2:21 a.m., Guangya Liu wrote:
> > src/docker/docker.cpp, lines 306-307
> > <https://reviews.apache.org/r/44531/diff/1/?file=1292300#file1292300line306>
> >
> >     I found that the NetworkMode is `default` when using `bridge` mode, so 
> > the value of `networkModeValue` would be `default` but not `bridge`, and 
> > this will cause line 315 constrcut a invalid addressLocation as 
> > `NetworkSettings.Networks.default.IPAddress` which will always failed and 
> > thus fall to old API.

I've found this to be true with at least docker 1.10.2.

Is it possible to launch a container with "--net default" (or ommitted) and 
have it not be a "bridge" in general with docker? I haven't determined that 
yet. If not, then we could statically test for "default" and set the string to 
"bridge" every time. Another thing to consider, if mesos /always/ launches a 
container with an explicit "--net bridge" or "--net host" parameter (until UDNs 
are implemented anyway), then we aren't really in danger of exposing the 
behavior described in this issue. Launching the container with an explicit 
"--net bridge" sets the NetworkMode field to "bridge" as well.


- Travis


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44531/#review122657
-----------------------------------------------------------


On March 8, 2016, 10:54 p.m., Timothy Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44531/
> -----------------------------------------------------------
> 
> (Updated March 8, 2016, 10:54 p.m.)
> 
> 
> Review request for mesos, Dan Osborne, Jie Yu, and Travis Hegner.
> 
> 
> Bugs: MESOS-4370
>     https://issues.apache.org/jira/browse/MESOS-4370
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed parsing network ip address with docker.
> 
> 
> Diffs
> -----
> 
>   src/docker/docker.cpp 52728707d985517e57525af7e470ccb468039373 
> 
> Diff: https://reviews.apache.org/r/44531/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Timothy Chen
> 
>

Reply via email to