[ https://issues.apache.org/jira/browse/YARN-8986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16695628#comment-16695628 ]
Xun Liu edited comment on YARN-8986 at 11/22/18 7:49 AM: --------------------------------------------------------- hi, [~Charo Zhang], [~eyang] {code:java} + if (strcasecmp(network_type, "bridge") != 0) { + ret = 0; + goto cleanup; + }{code} Not a bridge network, should it be able to perform port mapping as well? We now use docker to create a parallel network via calico. In the Hadoop submarine project, we still need to expose the services in the container (for example: tensorboard, zeppelin, etc.). was (Author: liuxun323): hi, [~Charo Zhang], [~eyang] {code:java} + if (network_name != NULL) { + char *docker_network_command = make_string("%s network inspect %s --format='{{.Driver}}'", docker_binary, network_name); + FILE* docker_network = popen(docker_network_command, "r"); + ret = fscanf(docker_network, "%s", network_type); + if (pclose (docker_network) != 0 || ret <= 0) { + fprintf (ERRORFILE, "Could not inspect docker network to get type %s.\n", docker_network_command); + goto cleanup; + } + // other network type exit successfully without ports mapping + if (strcasecmp(network_type, "bridge") != 0) { + ret = 0; + goto cleanup; + } + }{code} Not a bridge network, should it be able to perform port mapping as well? We now use docker to create a parallel network via calico. In the Hadoop submarine project, we still need to expose the services in the container (for example: tensorboard, zeppelin, etc.). > publish all exposed ports to random ports when using bridge network > ------------------------------------------------------------------- > > Key: YARN-8986 > URL: https://issues.apache.org/jira/browse/YARN-8986 > Project: Hadoop YARN > Issue Type: Sub-task > Components: yarn > Affects Versions: 3.1.1 > Reporter: Charo Zhang > Assignee: Charo Zhang > Priority: Minor > Labels: Docker > Attachments: YARN-8986.001.patch, YARN-8986.002.patch, > YARN-8986.003.patch, YARN-8986.004.patch, YARN-8986.005.patch, > YARN-8986.006.patch, YARN-8986.007.patch, YARN-8986.008.patch > > > it's better to publish all exposed ports to random ports(-P) or support port > mapping(-p) for bridge network when using bridge network for docker container. > -- 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