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

Eric Badger commented on YARN-6623:
-----------------------------------

Hey [~vvasudev], thanks for the updated patch! The changes related to YARN-4266 
look good. Just had one comment on the code. 

{noformat}
1850 +static int set_network(const struct configuration *command_config,
1851 +                       const struct configuration *conf, char *out,
1852 +                       const size_t outlen) {
1853 +
1854 +  int ret = 0;
1855 +  ret = add_param_to_command_if_allowed(command_config, conf, "net",
1856 +                                        "docker.allowed.networks", 
"--net=",
1857 +                                        0, 0, out, outlen);
1858 +  if (ret != 0) {
1859 +    fprintf(ERRORFILE, "Could not find requested network in allowed 
networks\n");
1860 +    ret = INVALID_DOCKER_NETWORK;
1861 +  }
1862 +  if (ret != 0) {
1863 +    memset(out, 0, outlen);
1864 +  }
1865 +  return ret;
1866 +}
{noformat}
Something I noticed in passing. We should combine the {{if(ret != 0)}} 
statements here. This same thing also occurs in {{set_capabilities()}} and 
{{set_devices()}}. 

> Add support to turn off launching privileged containers in the 
> container-executor
> ---------------------------------------------------------------------------------
>
>                 Key: YARN-6623
>                 URL: https://issues.apache.org/jira/browse/YARN-6623
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager
>            Reporter: Varun Vasudev
>            Assignee: Varun Vasudev
>            Priority: Blocker
>         Attachments: YARN-6623.001.patch, YARN-6623.002.patch, 
> YARN-6623.003.patch, YARN-6623.004.patch, YARN-6623.005.patch, 
> YARN-6623.006.patch, YARN-6623.007.patch, YARN-6623.008.patch, 
> YARN-6623.009.patch, YARN-6623.010.patch, YARN-6623.011.patch, 
> YARN-6623.012.patch
>
>
> Currently, launching privileged containers is controlled by the NM. We should 
> add a flag to the container-executor.cfg allowing admins to disable launching 
> privileged containers at the container-executor level.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
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