> On Dec. 1, 2017, 1:47 a.m., Jie Yu wrote:
> > src/docker/docker.cpp
> > Lines 742-743 (original), 742-752 (patched)
> > <https://reviews.apache.org/r/63860/diff/3/?file=1901748#file1901748line742>
> >
> >     It's weird that user specifies HOST in the API, but we use "nat" 
> > instead.
> >     
> >     Why can't we use transparent? I don't quite get that from the comments.
> 
> Akash Gupta wrote:
>     It's not a default network on Windows like it is on Linux. If you do a 
> `docker network ls` on a fresh Windows box, you see a `nat` network and a 
> `none` network. Transparent is the network driver type, so to use it, you 
> need to create an user defined network by doing `docker network create -d 
> transparent <NETWORK_NAME>` and then to use it, you do `docker run 
> --network=<NETWORK_NAME> ...`. I agree that using transparent would make more 
> sense, but we would have to make the agent create the network and pass that 
> in to the executor.

The real issue is that the API is Linux specific, since `HOST` and `BRIDGE` are 
linux only and `NAT` isn't defined, so a Windows user specifying `HOST` doesn't 
make sense. I think the best solution is to add `NAT` to the protobuf and then 
reword the docs to say that if the network mode is not given, then `HOST` and 
`BRIDGE` will be chosen for Linux and Windows respectively. I'm not sure if you 
can have different default settings for the protobuf, but we could have an 
undocumented `HOST -> NAT` conversion, since `HOST` mode isn't valid on Windows.


- Akash


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


On Nov. 27, 2017, 5:37 p.m., Akash Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63860/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2017, 5:37 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer and John Kordich.
> 
> 
> Bugs: MESOS-7342
>     https://issues.apache.org/jira/browse/MESOS-7342
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The current Network enum in DockerInfo is specific to Linux containers.
> Instead of supporting {host, bridge, none, user} networks, Windows
> docker supports {nat, none, user} networks. Now, if the host or bridge
> network type is sent to the Windows agent, it will be internally
> converted to nat.
> 
> 
> Diffs
> -----
> 
>   src/docker/docker.cpp 722a54ad113fc4e2bb22a8f08e307ab38d5fbfed 
> 
> 
> Diff: https://reviews.apache.org/r/63860/diff/3/
> 
> 
> Testing
> -------
> 
> See https://reviews.apache.org/r/63862/ for test results.
> 
> 
> Thanks,
> 
> Akash Gupta
> 
>

Reply via email to