mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Avinash Sridharan (JIRA)" <>
Subject [jira] [Assigned] (MESOS-7631) DefautlExecutor needs to inform tasks about IP addresses
Date Fri, 23 Jun 2017 04:23:00 GMT


Avinash Sridharan reassigned MESOS-7631:

    Assignee: Avinash Sridharan  (was: Anand Mazumdar)

> DefautlExecutor needs to inform tasks about IP addresses
> --------------------------------------------------------
>                 Key: MESOS-7631
>                 URL:
>             Project: Mesos
>          Issue Type: Task
>          Components: executor
>            Reporter: Avinash Sridharan
>            Assignee: Avinash Sridharan
>             Fix For: 1.4.0
> Currently, when the DefaultExecutor launches tasks it doesn’t pass any networking information
(host or CNI network IP addresses) to the tasks that it launches. This becomes problematic
for the applications which need to know the IP address that they need to bind to and cannot
rely on binding to INADDR_ANY. The tasks launched by the DefaultExecutor can potentially look
at all the available interface IP addresses and select a non-loopback IP address but this
is very error prone when there are multiple interfaces on a host or a container is attached
to multiple networks.
> Possible solution:
> The DefaultExecutor sets a variable MESOS_TASK_IP into the task’s shell. The task will
always read the variable to determine the IP address it should use. Below we describe the
algorithm to set MESOS_CONTAINER_IP for various cases.
> Setting MESOS_CONTAINER_IP for `host` network:
> For host network the `LIBPROCESS_IP` in the DefaultExecutor is always set to the agent
IP. The DefaultExecutor can therefore set `MESOS_TASK_IP` to the `LIBPROCESS_IP` whenever
it sees that the LIBPROCESS_IP is anything other than “” or “::” (for IPv6).
> Setting MESOS_TASK_IP for a single “CNI” network:
> For CNI network the `LIBPROCESS_IP` is set to “” and the `hostname` of the
container is set to the CNI ip address. The DefaultExecutor already resolves the hostname
for CNI network (to register with agent), so it can just set MESOS_TASK_IP to the IP address
it learnt by resolving the hostname.

This message was sent by Atlassian JIRA

View raw message