mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Hegner <travis.heg...@gmail.com>
Subject Re: Review Request 43093: MESOS-4370 NetworkSettings.IPAddress field is deprectaed in Docker
Date Tue, 08 Mar 2016 13:20:59 GMT


> On March 7, 2016, 5:36 p.m., Timothy Chen wrote:
> > Are you still be able to work on this? We like to get this merged, so if you can't
or don't reply we will create a new patch based on this.
> 
> Travis Hegner wrote:
>     Hi Timothy,
>     
>     I've been stalling this for https://reviews.apache.org/r/42516, as that patch will
change the way this patch should be written. It only works now out of pure luck in the way
docker intereprets multiple "--net" parameters, since mesos doesn't yet officially support
user defined networks.
>     
>     The linked patch will make this patch support it properly, as well as make this patch
easier to write, as the network name will not have to be queried at all from json; it will
be available as a variable.
> 
> Timothy Chen wrote:
>     I don't quite understand the pure luck part, IIUC your patch is updating how we parse
the Docker inspect output for Network IPAddress, which shouldn't matter how we actually launched
the container right? How is the linked patch related?
> 
> Timothy Chen wrote:
>     At this moment this is actually like becomes a blocker for 0.28 as we're not returning
the right IP address with the latest Docker daemon, so I'd like to get this in ASAP. For now
I'll create a new patch based on your changes, and once the dependend patch goes in will love
if you can continue the work.

I think I understand the miscommunication better now. As you know, beginning with docker 1.9
the docker inspect output changed the location of the IPAddress. The original location was
still populated for backwards compatability, but only for the common "bridge" and "host" network
types. Mesos is written to fail with any other network type. With the new user defined networks
feature, the old location was not populated. My patch was originally intended to address the
fact that with user defined networks, the original ip location was null.

In order to utilize user defined networks in my environment, we are passing arbitraty docker
parameters to mesos with the docker containerizer from marathon. This results in multiple
"--net" parameters passed to docker. The luck comes into play because mesos interperets the
first --net parameter of "bridge" and succeeds, and docker interperets the second --net parameter
of my UDN, and connects to the right network. I would consider this behavior unstable at best.

Based on the sudden up-tick in interest in this patch, I am speculating that docker 1.10 is
no longer populating the original ip address field (I would be un-aware, because I've been
running my cluster with this patch), which this patch will successfully fix, and even be stable
for the typical "host" and "bridge" networks.

All that said, I can see why this patch is now more important, even though it should be re-structured
after review 42516 is implemented. I'll see if I can spend some time today and address the
remaining issues with this patch.


- Travis


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


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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message