[ https://issues.apache.org/jira/browse/YARN-5168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16686634#comment-16686634 ]
Xun Liu commented on YARN-5168: ------------------------------- I think [~shaneku...@gmail.com] said that the port conflict is such a result. {quote}I believe supporting -P will lead to port conflicts. What if two containers running on the same NM both expose 8080? {quote} Both applications use the -p 8080:8080 parameter to create a port mapping for the container. The second application specifies that the host's 8080 port will definitely conflict. However, this is not a problem, because kubernetes will conflict if you specify the port when creating the pod. What we need to do is to send the conflict information to the user if the conflict occurs, and let the user create a port. I think [~eyang] said very important. {quote}2. Add "-p" to let user specify specific ports to map. {quote} The -P parameter is very useful. You can do this -P 8080, let the host pick an unoccupied port and bind it to the 8080 port of the container. Then the user can know which physical port is used by obtaining the container information. {quote}3. Add service registry support for bridge network case, then app could find each other. It could be done out of YARN, however it might be more convenient to support it natively in YARN. {quote} Just like kubernetes, the container service in the YARN cluster is reversed by ngxin or traefik, so that it can be used regardless of the container changes. With these network features supported, YARN can provide better online services through docker. [~eyang],The hadoop submarine project requires a port mapping feature very much. Can you assign this JIRA to me and let me contribute the patch? thank you! > Add port mapping handling when docker container use bridge network > ------------------------------------------------------------------ > > Key: YARN-5168 > URL: https://issues.apache.org/jira/browse/YARN-5168 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Jun Gong > Assignee: Eric Yang > Priority: Major > Labels: Docker > > YARN-4007 addresses different network setups when launching the docker > container. We need support port mapping when docker container uses bridge > network. > The following problems are what we faced: > 1. Add "-P" to map docker container's exposed ports to automatically. > 2. Add "-p" to let user specify specific ports to map. > 3. Add service registry support for bridge network case, then app could find > each other. It could be done out of YARN, however it might be more convenient > to support it natively in YARN. -- 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