----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43093/#review118436 -----------------------------------------------------------
Thanks for taking this on! Some small remarks below. Overall would it make sense -given that the API is ...unstable- to add some tests here? src/docker/docker.cpp (line 307) <https://reviews.apache.org/r/43093/#comment179653> Are these additional checks which should apply in both cases (i.e. deprecated and new `addressLocation`? I.e. prior to your change it did not return an error if `HostConfig.NetworkMode` was not set, or am I mistaken? Feel free to drop if this is the intended behavior! src/docker/docker.cpp (line 319) <https://reviews.apache.org/r/43093/#comment179657> Any reason you have a blank line here? src/docker/docker.cpp (line 322) <https://reviews.apache.org/r/43093/#comment179655> We don't end log messages with a period. hanks - Joerg Schad On Feb. 4, 2016, 9:27 p.m., Travis Hegner wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43093/ > ----------------------------------------------------------- > > (Updated Feb. 4, 2016, 9:27 p.m.) > > > Review request for mesos, haosdent huang and Kapil Arya. > > > 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 > >