hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shane Kumpf (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7935) Expose container's hostname to applications running within the docker container
Date Tue, 06 Mar 2018 18:13:00 GMT

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

Shane Kumpf commented on YARN-7935:

Thanks for the patch [~suma.shivaprasad]! 
{quote}However there is change in --hostName behaviour in "host" mode. Earlier the --hostName
was being set to YARN defined hostname(generated from container_id) which is incorrect in
host network mode. In this patch, it is set to the NM's host name which is the correct host
name. Although docker seems to be ignoring the --hostName set in "host" Mode in linux and
promotes the /etc/hosts file from the host, this is not the case in docker on Mac where it
is honoring the value passed in --hostName
I had overlooked this comment previously. There was some discussion on which is the appropriate
hostname to use in YARN-7797. Ultimately, it's a trade off. We had decided there was value
in honoring the container_id based hostname, even in "host" networking mode, for validating
Registry DNS, but it seems that decision may be incompatible with the need here. Given "host"
networking mode is really most appropriate for testing, I guess I don't have a problem with
changing the behavior to use the NM hostname. /cc [~billie.rinaldi] 

> 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

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

View raw message