Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10376

Enhance setOwner testing

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 3.0.0-alpha2
    • None
    • None

    Description

      TestPermission create a user with the following name and group:

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

      Supposedly

       userfs.setOwner(CHILD_FILE3, "foo", "bar");
      

      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.

      Attachments

        1. HDFS-10376.001.patch
          8 kB
          John Zhuge

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jzhuge John Zhuge
            yzhangal Yongjun Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment