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

Robert Kanter commented on YARN-8922:
-------------------------------------

The 002 patch:
- Ensures that we have created and loaded the test.cfg file to allow users with 
an id < 1000 to be used, while still keeping the permissions set to 0755 and 
the owner of the files as that user, even when root is being used.  It does 
this by following this procedure:
-# Create TEST_ROOT
-# Create and load test.cfg file
-# Figure out the user details
-# chown the TEST_ROOT and test.cfg files to the user
-# Set the user
-# Start the rest of the test
- Adds additional printfs to make it easier to debug when something goes wrong 
at setup
- Removes the TEST_ROOT dir on a successful run
-- It can be useful to have for debugging in a failed run; plus, we don't have 
a nice "clean up" hook like in junit to do this anyway

I've tested running it with root, a user >1000, a user <1000, and various args 
for each.  Plus, running cetest afterwards.  I'm pretty sure everything should 
work now.

> Fix test-container-executor
> ---------------------------
>
>                 Key: YARN-8922
>                 URL: https://issues.apache.org/jira/browse/YARN-8922
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 3.3.0
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>            Priority: Major
>         Attachments: YARN-8922.001.patch, YARN-8922.002.patch
>
>
> YARN-8448 attempted to fix the {{test-container-executor}} C test to be able 
> to run as root.  The test claims that it should be possible to run as root; 
> in fact, there are some tests that only run if you use root.  
> One of the fixes was to change the permissions of the test's config dir to 
> 0777 from 0755.  The problem was that the directory was owned by root, but 
> then other users would need to write files/directories under it, which would 
> fail with 0755.  YARN-8448 fixed this by making it 0777.  However, this 
> breaks running cetest because it expects the directory to be 0755, and it's 
> run afterwards.
> The proper fix for all this is to leave the directory at 0755, but to make 
> sure it's owned by the "nodemanager" user.  Confusingly, in 
> {{test-container-executor}}, that appears to be the {{username}} and not the 
> {{yarn_username}} (i.e. {{username}} is the user running the NM while 
> {{yarn_username}} is just some user running a Yarn app).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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