hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miklos Szegedi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7705) Create the container log directory with correct sticky bit in C code
Date Wed, 10 Jan 2018 23:12:03 GMT

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

Miklos Szegedi commented on YARN-7705:

Thank you for the patch [~yufeigu]!
1068	    if (container_log_dir == NULL) {
I would log here that concatenation failed and what were the parameters. It helps with supporting
the feature.
1064	  char *any_one_container_log_dir = NULL;
Just the fact that a log dir was would is represented by this variable. I would replace it
with a boolean (int). This will help to eliminate the extra logic on free().
1072	    if (create_directory_for_user(container_log_dir) != 0) {
1073	      free(container_log_dir);
1074	      return -1;
Please add some extra logging here as well.
370	    cmd_input.container_id = argv[optind++];
This requires a bump in the argument number check above to avoid buffer overflows.
822	  if (access(container_dir, R_OK) != 0) {
I would add a check that it is non NULL.

> Create the container log directory with correct sticky bit in C code
> --------------------------------------------------------------------
>                 Key: YARN-7705
>                 URL: https://issues.apache.org/jira/browse/YARN-7705
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 3.0.0, 3.1.0
>            Reporter: Yufei Gu
>            Assignee: Yufei Gu
>         Attachments: YARN-7705.001.patch, YARN-7705.002.patch
> YARN-7363 created the container log directory in Java, which isn't able to set the correct
sticky bit because of Java language limitation. Wrong sticky bit of log directory causes failure
of reading log files inside the directory. To solve that, we need to do it in C code. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org

View raw message