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

Vinod Kone commented on MESOS-6052:
-----------------------------------

Backported to 1.0.3.

commit 23da4b9418a61e65b8ab5357c57ad9a3bd4d7fe9
Author: Avinash sridharan <[email protected]>
Date:   Wed Sep 7 13:30:53 2016 -0700

    Modified network file setup in `network/cni` isolator.
    
    In case /etc/hosts and /etc/hostname files are not present in the host
    filesystem, we were ignoring these files and assuming that they would
    not be required by the executor when it is launched in a new network
    namespace. This assumption is incorrect, since the executor needs
    /etc/hosts in the new network namespace to resolve its hostname.
    Hence, we are explicitly creating these files in the host file system
    in case they are not present, so that containers /etc/hosts and
    /etc/hostname can be mounted on these mount points. This solves the
    problem in distributions such as CoreOS that don't have /etc/hosts in
    their host filesystem.
    
    Review: https://reviews.apache.org/r/51643/


> Unable to launch containers on CNI networks on CoreOS
> -----------------------------------------------------
>
>                 Key: MESOS-6052
>                 URL: https://issues.apache.org/jira/browse/MESOS-6052
>             Project: Mesos
>          Issue Type: Bug
>          Components: containerization
>    Affects Versions: 1.0.0
>         Environment: Linux
>            Reporter: Avinash Sridharan
>            Assignee: Avinash Sridharan
>              Labels: mesosphere
>             Fix For: 1.1.0
>
>
> CoreOS does not have an `/etc/hosts`. Currently, in the `network/cni` 
> isolator, if we don't see a `/etc/hosts` on the host filesystem we don't bind 
> mount the containers `hosts` file to this target for the `command executor`. 
> On distros such as CoreOS this fails the container launch since the 
> `libprocess` initialization of the `command executor` fails cause it can't 
> resolve its `hostname`.
> We should be creating the `/etc/hosts` and `/etc/hostname` files when they 
> are absent on the host filesystem since creating these files should not 
> affect name resolution on the host network namespace, and it will allow the 
> `/etc/hosts` file to be bind mounted correctly and allow name resolution in 
> the containers network namespace as well. 



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

Reply via email to