[ 
https://issues.apache.org/jira/browse/MESOS-4370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15128460#comment-15128460
 ] 

ASF GitHub Bot commented on MESOS-4370:
---------------------------------------

GitHub user travishegner opened a pull request:

    https://github.com/apache/mesos/pull/90

    [MESOS-4370] Retrieve network mode and use that to get that networks IP 
address.

    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. This patch is tested against Docker 1.9.1 on Ubuntu 14.04.
    
    Continues #87 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/travishegner/mesos networkInfo

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/mesos/pull/90.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #90
    
----
commit 7ca66172974de6747d9a3ae33d81c5dade99c302
Author: Travis Hegner <theg...@trilliumit.com>
Date:   2016-01-15T13:40:51Z

    Retrieve network mode (name) and use that to get that networks IP address.

----


> NetworkSettings.IPAddress field is deprectaed in Docker
> -------------------------------------------------------
>
>                 Key: MESOS-4370
>                 URL: https://issues.apache.org/jira/browse/MESOS-4370
>             Project: Mesos
>          Issue Type: Bug
>          Components: containerization, docker
>    Affects Versions: 0.25.0, 0.26.0
>         Environment: Ubuntu 14.04
> Docker 1.9.1
>            Reporter: Clint Armstrong
>
> The latest docker API deprecates the NetworkSettings.IPAddress field, in 
> favor of the NetworkSettings.Networks field.
> https://docs.docker.com/engine/reference/api/docker_remote_api/#v1-21-api-changes
> With this deprecation, NetworkSettings.IPAddress is not populated for 
> containers running with networks that use new network plugins.
> As a result the mesos API has no data in 
> container_status.network_infos.ip_address or 
> container_status.network_infos.ipaddresses.
> The immediate impact of this is that mesos-dns is unable to retrieve a 
> containers IP from the netinfo interface.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to