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

Jason Lowe commented on YARN-4594:
----------------------------------

Thanks for updating the patch!  There's just a couple of remaining bugs, both 
related to remnants from when error codes were negated:
{code}
  ret = recursive_unlink_children(full_path);
  if (ret == ENOENT) {
    return 0;
  }
  if (ret != 0) {
    fprintf(LOGFILE, "Error while deleting %s: %d (%s)\n",
            full_path, -ret, strerror(-ret));
{code}
It's negating ret when it shouldn't at the fprintf call.  Same thing for the 
following instance:
{code}
  if (rmdir(full_path) != 0) {
    ret = errno;
    if (ret != ENOENT) {
      fprintf(LOGFILE, "Couldn't delete directory %s - %s\n",
              full_path, strerror(-ret));
{code}

It would also be nice to cleanup the whitespace nits, although it's no trouble 
cleaning those up as part of the commit.

> container-executor fails to remove directory tree when chmod required
> ---------------------------------------------------------------------
>
>                 Key: YARN-4594
>                 URL: https://issues.apache.org/jira/browse/YARN-4594
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: YARN-4594.001.patch, YARN-4594.002.patch, 
> YARN-4594.003.patch
>
>
> test-container-executor.c doesn't work:
> * It assumes that realpath(/bin/ls) will be /bin/ls, whereas it is actually 
> /usr/bin/ls on many systems.
> * The recursive delete logic in container-executor.c fails -- nftw does the 
> wrong thing when confronted with directories with the wrong mode (permission 
> bits), leading to an attempt to run rmdir on a non-empty directory.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to