Sidharta Seethana commented on YARN-4004:

For the segment of code below, would it be safer to print out the last few 
lines (few = some pre-determined constant) instead of the entire docker logs 
output? Given the duration of the time between 'docker run' and 'docker wait', 
this output is unlikely to be large, but just in case.  Docker has a mechanism 
for this : {{docker logs --tail=<num> <container_id>}}

 snprintf(docker_logs_command, PATH_MAX, "%s logs %s",
        docker_binary, container_id);
      FILE* logs = popen(docker_logs_command, "r");
      while(fgets(buffer, PATH_MAX, logs) != NULL) {
        fprintf(ERRORFILE, "%s", buffer);

> container-executor should print output of docker logs if the docker container 
> exits with non-0 exit status
> ----------------------------------------------------------------------------------------------------------
>                 Key: YARN-4004
>                 URL: https://issues.apache.org/jira/browse/YARN-4004
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager
>    Affects Versions: 2.8.0
>            Reporter: Varun Vasudev
>            Assignee: Varun Vasudev
>         Attachments: YARN-4004.001.patch
> When a docker container exits with a non-0 exit code, we should print the 
> docker logs to make debugging easier.

This message was sent by Atlassian JIRA

Reply via email to