[jira] [Commented] (YARN-7935) Expose container's hostname to applications running within the docker container

2018-03-28 Thread Mridul Muralidharan (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-7935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16418029#comment-16418029
 ] 

Mridul Muralidharan commented on YARN-7935:
---

[~eyang] I think there is some confusion here.
Spark does not require user defined networks - I dont think it was mentioned 
that this was required.

Taking a step back:

With "host" networking mode, we get it to work without any changes to the 
application code at all - giving us all the benefits of isolation without any 
loss in existing functionality (modulo specifying the env variables required 
ofcourse).

When used with bridge/overlay/user defined networks/etc, the container hostname 
passed to spark AM via allocation request is that of nodemanager, and not the 
actual container hostname used in the docker container.
This patch exposes the container hostname as an env variable - just as we have 
other container and node specific env variables exposed to the container 
(CONTAINER_ID, NM_HOST, etc).

Do you see any concern with exposing this variable ? I want to make sure I am 
not missing something here.

What spark (or any other application) does with this variable is their 
implementation detail; I can go into details of why this is required in the 
case of spark specifically if required, but that might digress from the jira.


> Expose container's hostname to applications running within the docker 
> container
> ---
>
> Key: YARN-7935
> URL: https://issues.apache.org/jira/browse/YARN-7935
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: yarn
>Reporter: Suma Shivaprasad
>Assignee: Suma Shivaprasad
>Priority: Major
> Attachments: YARN-7935.1.patch, YARN-7935.2.patch, YARN-7935.3.patch
>
>
> Some applications have a need to bind to the container's hostname (like 
> Spark) which is different from the NodeManager's hostname(NM_HOST which is 
> available as an env during container launch) when launched through Docker 
> runtime. The container's hostname can be exposed to applications via an env 
> CONTAINER_HOSTNAME. Another potential candidate is the container's IP but 
> this can be addressed in a separate jira.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-7935) Expose container's hostname to applications running within the docker container

2018-03-27 Thread Mridul Muralidharan (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-7935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16415223#comment-16415223
 ] 

Mridul Muralidharan commented on YARN-7935:
---

[~eyang] Using YARN service to run spark AM is not feasible; IMO requiring use 
of yarn service to leverage docker support in yarn must not be a requirement.

> Expose container's hostname to applications running within the docker 
> container
> ---
>
> Key: YARN-7935
> URL: https://issues.apache.org/jira/browse/YARN-7935
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: yarn
>Reporter: Suma Shivaprasad
>Assignee: Suma Shivaprasad
>Priority: Major
> Attachments: YARN-7935.1.patch, YARN-7935.2.patch, YARN-7935.3.patch
>
>
> Some applications have a need to bind to the container's hostname (like 
> Spark) which is different from the NodeManager's hostname(NM_HOST which is 
> available as an env during container launch) when launched through Docker 
> runtime. The container's hostname can be exposed to applications via an env 
> CONTAINER_HOSTNAME. Another potential candidate is the container's IP but 
> this can be addressed in a separate jira.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-7935) Expose container's hostname to applications running within the docker container

2018-02-22 Thread Mridul Muralidharan (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-7935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16373202#comment-16373202
 ] 

Mridul Muralidharan commented on YARN-7935:
---

Hi [~tgraves],

   Initial expectation was that there will be no change in client application 
with introduction of docker support in yarn.
Unfortunately, in our experiments, we find the need to make application changes 
- the scope of which is still not know.

For example, with 'host' networking mode, there is actually no change required 
and things work seemlessly ! (and give us package isolation we so badly require)
But with bridge or overlay, YARN-7935 will be required (among other things - 
which is still under investigation).

>From spark side of things, I am still unsure about what all other changes are 
>needed and we are still investigating there too.

We use "--hostname" not just to specify where to bind to, but also what to 
report back to driver.
Driver uses this for comm as well as locality computation (HOST_LOCAL and 
RACK_LOCAL).
Hence it is not simple case of replacing --hostname with CONTAINER_HOSTNAME (if 
available) - that will break HOST locality computation.


I wanted to create an a jira in spark once the scope was more concrete, but I 
can do that sooner if it helps to collaborate better.
If you are doing some experiments, would be great to touch base !


> Expose container's hostname to applications running within the docker 
> container
> ---
>
> Key: YARN-7935
> URL: https://issues.apache.org/jira/browse/YARN-7935
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: yarn
>Reporter: Suma Shivaprasad
>Assignee: Suma Shivaprasad
>Priority: Major
> Attachments: YARN-7935.1.patch, YARN-7935.2.patch
>
>
> Some applications have a need to bind to the container's hostname (like 
> Spark) which is different from the NodeManager's hostname(NM_HOST which is 
> available as an env during container launch) when launched through Docker 
> runtime. The container's hostname can be exposed to applications via an env 
> CONTAINER_HOSTNAME. Another potential candidate is the container's IP but 
> this can be addressed in a separate jira.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-7935) Expose container's hostname to applications running within the docker container

2018-02-21 Thread Mridul Muralidharan (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-7935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16372320#comment-16372320
 ] 

Mridul Muralidharan commented on YARN-7935:
---

The hostname executor's bind port(s) to and share with other executors/driver 
(AM), is passed in as cli parameter for executor in case of apache spark. 
Particularly in deployments with multiple interfaces and hostnames, it does not 
try to determine which hostname to use : simply depend on what the resource 
manager (yarn in this case) is configured with and shared with the container to 
use.

 

Apache spark works across resource managers (standalone, mesos, k8s, yarn, etc) 
and expects this to be determined by the individual resource manager it is 
running on.

> Expose container's hostname to applications running within the docker 
> container
> ---
>
> Key: YARN-7935
> URL: https://issues.apache.org/jira/browse/YARN-7935
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: yarn
>Reporter: Suma Shivaprasad
>Assignee: Suma Shivaprasad
>Priority: Major
> Attachments: YARN-7935.1.patch, YARN-7935.2.patch
>
>
> Some applications have a need to bind to the container's hostname (like 
> Spark) which is different from the NodeManager's hostname(NM_HOST which is 
> available as an env during container launch) when launched through Docker 
> runtime. The container's hostname can be exposed to applications via an env 
> CONTAINER_HOSTNAME. Another potential candidate is the container's IP but 
> this can be addressed in a separate jira.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org