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

Shane Kumpf commented on YARN-8027:
-----------------------------------

Honoring the YARN provided hostname was discussed a bit in YARN-7797 and 
YARN-7935, however, it seems that decision to keep the YARN generated hostname 
breaks down in a few places, namely for deployments not running Registry DNS. 
Being able to validate Registry DNS, even when --net=host, does have value, but 
it may not be worth the trade off.

Few options I can think of:
 # Check the configuration to determine if Registry DNS is enabled. If 
disabled, don't set the --hostname. If enabled, set the --hostname.
 # Don't set the --hostname if --net=host in all cases.
 # Add a configuration flag to toggle this behavior for --net=host containers 
(something like: 
yarn.nodemanager.runtime.linux.docker.network.host.use-yarn-generated-hostname),
 decoupling the dependency on the Registry DNS.

Option #2 would provide consistency in the case where Docker ignores the 
--hostname flag, but makes it impossible for a user to achieve the current 
behavior. I'm struggling with a use case where we would want to set --hostname 
without Registry DNS, so #1 seems more appropriate than adding a new config 
called out in #3, but maybe others can think of a case where decoupling the 
configuration from Registry DNS makes sense.

> 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
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to