----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63860/#review194884 -----------------------------------------------------------
Fix it, then Ship it! src/docker/docker.cpp Line 741 (original), 747-754 (patched) <https://reviews.apache.org/r/63860/#comment273958> I'd suggest the following way. `DEFAULT_DOCKER_NETWORK` should be killed. ``` ContainerInfo::DockerInfo::Network network; if (!dockerInfo.has_network()) { #ifdef __WINDOWS__ network = ContainerInfo::DockerInfo::Network::BRIDGE; #else network = ContainerInfo::DockerInfo::Network::HOST; #endif } else { network = dockerInfo.network(); } switch (network) { ... } ``` src/docker/docker.cpp Line 777 (original), 812 (patched) <https://reviews.apache.org/r/63860/#comment273957> I don't mention `nat` at all here because from API perspective, `nat` is not expose to the users. Users only knows about BRIDGE. ``` Port mappings are only supported for BRIDGE and USER network ``` - Jie Yu On Jan. 5, 2018, 6:31 p.m., Akash Gupta wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63860/ > ----------------------------------------------------------- > > (Updated Jan. 5, 2018, 6:31 p.m.) > > > Review request for mesos, Alexander Rukletsov, Andrew Schwartzmeyer, Gaston > Kleiman, Jie Yu, John Kordich, Joseph Wu, and Michael Park. > > > Bugs: MESOS-7342 > https://issues.apache.org/jira/browse/MESOS-7342 > > > Repository: mesos > > > Description > ------- > > The Network enum in DockerInfo is specific to Linux containers. `HOST` > doesn't exist on Windows and `BRIDGE` is `NAT` on Windows. The current > default docker network setting was always `HOST`, which broke the > Windows docker executor. Now, if a specific network isn't given, the > network mode will default to `HOST` on Linux agents and `NAT` on Windows > agents. Also, `BRIDGE` mode will be translated to `NAT` on Windows. > > > Diffs > ----- > > src/docker/docker.cpp 722a54ad113fc4e2bb22a8f08e307ab38d5fbfed > > > Diff: https://reviews.apache.org/r/63860/diff/6/ > > > Testing > ------- > > See https://reviews.apache.org/r/63862/ for test results. > > > Thanks, > > Akash Gupta > >
