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

Avinash Sridharan commented on MESOS-7709:
------------------------------------------

Currently, if the underlying plugins do not return a DNS nameserver than the 
network/cni isolator for CNI and docker daemon (for CNM) default to whatever is 
configured in the hosts `/etc/resolv.conf`. The problem with this mechanism is 
that `/etc/resolv.conf` allows only 3 nameservers to the be specified. So its 
pretty inflexible for the operators to setup defaults for networks where the 
operator knows the plugins are not going to return DNS nameservers. The problem 
becomes even more acerbated when you have a mix of v4 and v6 containers, since 
if now you rely only on `/etc/resolv.conf` to provide the default you will have 
pick some of the 3 possible nameservers to v4 and some to v6 again making it 
inflexible.

> Add --dns flag to the agent.
> ----------------------------
>
>                 Key: MESOS-7709
>                 URL: https://issues.apache.org/jira/browse/MESOS-7709
>             Project: Mesos
>          Issue Type: Task
>          Components: containerization
>            Reporter: Avinash Sridharan
>            Assignee: Avinash Sridharan
>
> Mesos support both CNI (through `network/cni` isolator) and CNM (through 
> docker) specification. Both these specifications allow for DNS entries for 
> containers to be set on a per-container, and per-network basis. 
> Currently, the behavior of the agent is to use the DNS nameservers set in 
> /etc/resolv.conf when the CNI or CNM plugin that is used to attached the 
> container to the CNI/CNM network doesnt' explicitly set the DNS for the 
> container. This is a bit inflexible especially when we have a mix of v4 and 
> v6 networks. 
> The operator should be able to specify DNS nameservers for the networks he 
> installs either the override the ones provided by the plugin or as defaults 
> when the plugins are not going to specify DNS name servers.
> In order to achieve the above goal we need to introduce a `--dns` flag to the 
> agent. The `--dns` flag should support a JSON (or a JSON file) with the 
> following schema:
> {
>   "mesos": {
>          [ 
>            { "network" : <name of the network>,
>              "nameservers": [<list of name servers (upto 3)>]
>            }
>          ]
>   },
>   "docker": {
>         [ 
>            { "network" : <name of the network>,
>              "nameservers": [<list of name servers (upto 3)>]
>            }
>          ]
>   }
> }



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to