hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suma Shivaprasad (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-8027) Setting hostname of docker container breaks for --net=host in docker 1.13
Date Wed, 14 Mar 2018 18:12:00 GMT

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

Suma Shivaprasad commented on YARN-8027:
----------------------------------------

IMO it would be better to set the --hostname to a known YARN generated DNS friendly qualified
name for both Yarn native service managed and other application containers (which is the current
behaviour). When not set, docker sets it to the container's ID which is a random string and
would be known only on docker inspect. This would avoid initial DNS server lookups atleast
from within the container in case of both user defined networks and Yarn native services.

{noformat}

docker run --net=my-net --name test789 -it spark-r bash
[root@03e058a25680 /]# hostname -f
03e058a25680
[root@03e058a25680 /]# hostname
03e058a25680
[root@03e058a25680 /]# cat /etc/host
cat: /etc/host: No such file or directory
[root@03e058a25680 /]# cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.18.0.4 03e058a25680

{noformat}

Setting the hostname doesnt affect the behaviour of Docker Embedded DNS resolution in case
of user defined networks since it uses the container's name/network-alias.

> Setting hostname of docker container breaks for --net=host in docker 1.13
> -------------------------------------------------------------------------
>
>                 Key: YARN-8027
>                 URL: https://issues.apache.org/jira/browse/YARN-8027
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: yarn
>    Affects Versions: 3.0.0
>            Reporter: Jim Brennan
>            Assignee: Jim Brennan
>            Priority: Major
>         Attachments: YARN-8027.001.patch
>
>
> In DockerLinuxContainerRuntime:launchContainer, we are adding the --hostname argument
to the docker run command to set the hostname in the container to something like:  ctr-e84-1520889172376-0001-01-000001.
> This does not work when combined with the --net=host command line option in Docker 1.13.1.
 It causes multiple failures when the client tries to resolve the hostname and it fails.
> We haven't seen this before because we were using docker 1.12.6 which seems to ignore
--hostname when you are using --net=host.



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

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


Mime
View raw message