[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2017-02-14 Thread John Zhuge (JIRA)

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

John Zhuge commented on HDFS-10376:
---

Sure [~yzhangal]

> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Fix For: 3.0.0-alpha2
>
> Attachments: HDFS-10376.001.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2017-02-14 Thread Yongjun Zhang (JIRA)

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

Yongjun Zhang commented on HDFS-10376:
--

HI [~jzhuge],

Thanks [~daryn] for having fixed some relevant issues mentioned here
https://issues.apache.org/jira/browse/HDFS-10376?focusedCommentId=15527283&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15527283

Would you please create a new jira to add the other tests that were in rev2 
that we left out when commiting the fix here?

Thanks.


> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Fix For: 3.0.0-alpha2
>
> Attachments: HDFS-10376.001.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-27 Thread John Zhuge (JIRA)

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

John Zhuge commented on HDFS-10376:
---

Thanks [~yzhangal] for the review and commit!

> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Fix For: 3.0.0-alpha2
>
> Attachments: HDFS-10376.001.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-27 Thread Yongjun Zhang (JIRA)

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

Yongjun Zhang commented on HDFS-10376:
--

Committed to trunk. Thanks [~jzhuge] for the contribution.


> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Fix For: 3.0.0-alpha2
>
> Attachments: HDFS-10376.001.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-27 Thread Hudson (JIRA)

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

Hudson commented on HDFS-10376:
---

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10501 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/10501/])
HDFS-10376. Enhance setOwner testing. (John Zhuge via Yongjun Zhang) (yzhang: 
rev 2acfb1e1e4355246ef707b7c17964871b5dc7a73)
* (edit) 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestPermission.java


> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Attachments: HDFS-10376.001.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-27 Thread John Zhuge (JIRA)

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

John Zhuge commented on HDFS-10376:
---

Done [~yzhangal].

> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Attachments: HDFS-10376.001.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-27 Thread Yongjun Zhang (JIRA)

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

Yongjun Zhang commented on HDFS-10376:
--

Found that [~daryn] is working on the issue reported here

https://issues.apache.org/jira/browse/HDFS-10376?focusedCommentId=15520417&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15520417

So I'm +1 on patch rev1, and will commit soon today.

Hi [~jzhuge], would you please remove rev2 to avoid confusion?

Thanks.


> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Attachments: HDFS-10376.001.patch, HDFS-10376.002.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-25 Thread Yongjun Zhang (JIRA)

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

Yongjun Zhang commented on HDFS-10376:
--

Indeed the tests are unrelated. +1 on patch rev2.

Let's follow-up with the remaining issue separately.

Thanks.




> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Attachments: HDFS-10376.001.patch, HDFS-10376.002.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-25 Thread John Zhuge (JIRA)

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

John Zhuge commented on HDFS-10376:
---

Thanks [~yzhangal]. I will look into it and create a new JIRA if necessary.

Test failures are unrelated. And the patch only touches test code in 
{{TestPermission.java}}.

> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Attachments: HDFS-10376.001.patch, HDFS-10376.002.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-25 Thread Yongjun Zhang (JIRA)

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

Yongjun Zhang commented on HDFS-10376:
--

Hi [~jzhuge],

Thanks for the new rev. 

I expect the new tests you added:
* testNonSuperCannotChangeOwnerForNonExistentFile(); should throw FNF exception
* testNonSuperCannotChangeOwnerForNonExistentFileInNoAccessDir(); should throw 
ACE exception
but I can understand that due to a hole in other places in the code, we can not 
guarantee that yet.

Would you please create a separate jira for these issues, and we can fix these 
tests again when that new jira is fixed.

I think your new patch looks good, except would you please check the jenkins 
test failure?

Thanks.






> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Attachments: HDFS-10376.001.patch, HDFS-10376.002.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-23 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HDFS-10376:
--

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
14s{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  8m 
30s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
54s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
26s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  1m  
1s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
14s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  1m 
48s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
0s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
49s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
52s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
52s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
25s{color} | {color:green} hadoop-hdfs-project/hadoop-hdfs: The patch generated 
0 new + 13 unchanged - 1 fixed = 13 total (was 14) {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
59s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
10s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  1m 
58s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
56s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 66m 45s{color} 
| {color:red} hadoop-hdfs in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
24s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 88m 49s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | hadoop.hdfs.server.namenode.TestAddStripedBlockInFBR |
|   | hadoop.hdfs.TestDFSShell |
|   | hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFS |
|   | hadoop.hdfs.server.datanode.TestDirectoryScanner |
|   | hadoop.hdfs.server.namenode.TestDiskspaceQuotaUpdate |
\\
\\
|| Subsystem || Report/Notes ||
| Docker |  Image:yetus/hadoop:9560f25 |
| JIRA Issue | HDFS-10376 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12830112/HDFS-10376.002.patch |
| Optional Tests |  asflicense  compile  javac  javadoc  mvninstall  mvnsite  
unit  findbugs  checkstyle  |
| uname | Linux 14776125dc25 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 
21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/hadoop/patchprocess/precommit/personality/provided.sh 
|
| git revision | trunk / 6eb700e |
| Default Java | 1.8.0_101 |
| findbugs | v3.0.0 |
| unit | 
https://builds.apache.org/job/PreCommit-HDFS-Build/16848/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HDFS-Build/16848/testReport/ |
| modules | C: hadoop-hdfs-project/hadoop-hdfs U: 
hadoop-hdfs-project/hadoop-hdfs |
| Console output | 
https://builds.apache.org/job/PreCommit-HDFS-Build/16848/console |
| Powered by | Apache Yetus 0.4.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> Enhance setOwner testing
> 
>
> Key: HDFS-10376
>  

[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-22 Thread Yongjun Zhang (JIRA)

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

Yongjun Zhang commented on HDFS-10376:
--

Hi [~jzhuge],

Thanks for your thorough work here.

All looks good, except one suggestion:
{code}
  private void testNonSuperCannotChangeOwnerForNonExistentFile()
  throws Exception {
Path file = new Path(ROOT_PATH,
"testNonSuperCannotChangeOwnerForNonExistentFile");
assertFalse(userfs.exists(file));
try {
  userfs.setOwner(file, NOUSER, null);
  fail("Expect ACE or FNFE when a non-super user tries to change owner " +
  "for a non-existent file");
} catch (AccessControlException e) {
  assertThat(e.getMessage(), startsWith(
  "Non-super user cannot change owner"));
} catch (FileNotFoundException e) {
}
  }
{code}
In this test, non-existing file can be of two types:
1. there is one parent component that restrict the access of this non-super 
user, in this case, we'd expect to see AccessControlException only.
2. all components in the path of this non-existing file allows access of this 
non-super user, depending on whether the implementation check file existence 
first, or check ownership first, we could either see AccessControlException or 
FileNotFoundException.

Your test here covers type 2, wonder if we can have a test for type 1?

Thanks.


> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Attachments: HDFS-10376.001.patch
>
>
> TestPermission create a user with the following name and group:
> {code}
>  final private static String USER_NAME = "user" + RAN.nextInt();
>  final private static String[] GROUP_NAMES = {"group1", "group2"};
>UserGroupInformation userGroupInfo = 
> UserGroupInformation.createUserForTesting(USER_NAME, GROUP_NAMES );
>   
>   FileSystem userfs = DFSTestUtil.getFileSystemAs(userGroupInfo, conf);
>   // make sure mkdir of a existing directory that is not owned by 
>   // this user does not throw an exception.
>   userfs.mkdirs(CHILD_DIR1);
>   
> {code}
> Supposedly 
> {code}
>  userfs.setOwner(CHILD_FILE3, "foo", "bar");
> {code}
> will be run as the specified user, but it seems to be run as me who run the 
> test.
> Running as the specified user would disallow setOwner, which requires 
> superuser privilege. This is not happening.
> Creating this jira for some investigation to understand whether it's indeed 
> an issue.
> Thanks.



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

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-10376) Enhance setOwner testing

2016-09-15 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HDFS-10376:
--

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
10s{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  6m 
34s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
43s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
26s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
51s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
12s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  1m 
39s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
54s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
46s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
41s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
41s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
22s{color} | {color:green} hadoop-hdfs-project/hadoop-hdfs: The patch generated 
0 new + 13 unchanged - 1 fixed = 13 total (was 14) {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
48s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
 9s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  1m 
43s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
54s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 57m 38s{color} 
| {color:red} hadoop-hdfs in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
17s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 76m  2s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | hadoop.hdfs.TestDFSShell |
\\
\\
|| Subsystem || Report/Notes ||
| Docker |  Image:yetus/hadoop:9560f25 |
| JIRA Issue | HDFS-10376 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12828733/HDFS-10376.001.patch |
| Optional Tests |  asflicense  compile  javac  javadoc  mvninstall  mvnsite  
unit  findbugs  checkstyle  |
| uname | Linux 176f13935cfc 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 
21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/hadoop/patchprocess/precommit/personality/provided.sh 
|
| git revision | trunk / fcbac00 |
| Default Java | 1.8.0_101 |
| findbugs | v3.0.0 |
| unit | 
https://builds.apache.org/job/PreCommit-HDFS-Build/16759/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HDFS-Build/16759/testReport/ |
| modules | C: hadoop-hdfs-project/hadoop-hdfs U: 
hadoop-hdfs-project/hadoop-hdfs |
| Console output | 
https://builds.apache.org/job/PreCommit-HDFS-Build/16759/console |
| Powered by | Apache Yetus 0.4.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> Enhance setOwner testing
> 
>
> Key: HDFS-10376
> URL: https://issues.apache.org/jira/browse/HDFS-10376
> Project: Hadoop HDFS
>  Issue Type: Bug
>Affects Versions: 2.6.0
>Reporter: Yongjun Zhang
>Assignee: John Zhuge
> Att