Shane Kumpf commented on YARN-7987:

Thanks for testing out that flag [~suma.shivaprasad]! I'm glad to hear this 
looks like a possible option to avoid changing the container name.

network-alias is not a valid option in the "default bridge"and "host" 
networking modes and adding this flag fails. Will need to check and add this to 
docker container runs only in the case of user defined networks.
Makes sense. User's can modify the default bridge, so I think we'll need to 
consider that case. I believe we could look at 
{{com.docker.network.bridge.default_bridge}} in {{docker network inspect 
<name>}} to determine if the supplied network is the default bridge and avoid 
the flag in that case.

However, since the YARN generated hostnames (generated from container-id) are 
unique, this should not be a major issue IMO. 
I agree, I don't think that's a situation we would run into.

> Docker container name(--name) needs to be DNS friendly for DNS resolution to 
> work in user defined networks. 
> ------------------------------------------------------------------------------------------------------------
>                 Key: YARN-7987
>                 URL: https://issues.apache.org/jira/browse/YARN-7987
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Suma Shivaprasad
>            Assignee: Suma Shivaprasad
>            Priority: Major
> User defined networks like overlays support DNS resolution through Docker 
> Embedded DNS which needs the container name (–name parameter value in docker 
> run) to be a FQDN for container names to be resolved - Please refer 
> documentation 
> [https://docs.docker.com/v17.09/engine/userguide/networking/configure-dns/]
> However Yarn sets the container name to the container's id which is not DNS 
> friendly(eg: container_e26_1519402686002_0035_01_000003) and is not a FQDN. 
> The proposal is to set a FQDN(eg: 
> ctr-e26-1519402686002-0035-01-000003.domain-name) as the docker container's 
> name for containers to be able to communicate to each other via hostnames in 
> user defined networks like overlays, bridges etc. The domain name will be 
> picked up from the YARN DNS registry configuration 
> (hadoop.registry.dns.domain-name)

This message was sent by Atlassian JIRA

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