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

Shane Kumpf commented on YARN-6623:
-----------------------------------

Thanks for the patch [~vvasudev]! Overall it looks great. Thanks for the 
effort. Couple of comments.

Can we print out the mount that was requested but failed for the read-only and 
read write checks? I found it a bit difficult to determine which mount was the 
cause of the failure. Doing the same for the devices option would be helpful as 
well. Something like the following:
{code}
        if (permitted_rw == 0) {
          fprintf(ERRORFILE, "Requested rw mount not found in the rw whitelist 
'%s', realpath=%s\n", values[i], mount_src);
          ret = INVALID_DOCKER_RW_MOUNT;
          goto free_and_exit;
-snip-
     if (ro != 0 && permitted_ro == 0 && permitted_rw == 0) {
        fprintf(ERRORFILE, "Requested ro mount not found in the ro whitelist 
'%s', realpath=%s\n", values[i], mount_src);
        ret = INVALID_DOCKER_RO_MOUNT;
        goto free_and_exit;
      }
{code}

Currently only {{docker run}} works with this patch. I know you are aware of 
this. There are a few regressions in this patch from what was fixed in 
YARN-6726. It would be great if we could try to address them here. I'll list 
the ones I'm aware of below.

1) get_docker_inspect_command uses validate_container_id directly, instead of 
validate_container_name.
{code}
  if (container_name == NULL || validate_container_id(container_name) != 0) {
    return INVALID_DOCKER_CONTAINER_NAME;
  }
{code}

2) The {{--format}} option for {{docker inspect}} can't be quoted, or it breaks 
the returned output.
{code}
quote_and_append_arg(&tmp_buffer, &tmp_buffer_size, " --format=", format);
{code}

3) The container name as the final argument can't be quoted. This happens in a 
number of places.
{code}
quote_and_append_arg(&tmp_buffer, &tmp_buffer_size, "", container_name);
{code}

See this comment for what I had found previously.
[YARN-6726 
Items|https://issues.apache.org/jira/browse/YARN-6726?focusedCommentId=16082179&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16082179]

> 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
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to