xBis7 opened a new pull request, #5816:
URL: https://github.com/apache/ozone/pull/5816

   ## What changes were proposed in this pull request?
   
   When doing a `listStatus` on a volume, we were setting the volume owner as 
the resource owner. Therefore, `ozone fs -ls` was resulting in displaying the 
volume owner as the owner of every bucket. 
   
   Check the jira description for a test-case for manually reproducing it. 
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-9950
   
   ## How was this patch tested?
   
   A new test was added under `TestRootedOzoneFileSystem`. The patch was also 
tested manually in ozone docker dev env like so
   ```
   > pwd
   /projects/ozone/hadoop-ozone/dist/target/ozone-1.5.0-SNAPSHOT/compose/ozone
   
     // Start docker env
   > docker-compose up --scale datanode=5 -d
   
     // Create volume with the default user, hadoop
   > docker-compose exec om ozone sh volume create /vol1
   
     // Create bucket and set the owner as testuser
   > docker-compose exec om ozone sh bucket create /vol1/bucket1 --user 
testuser 
   
     // Create bucket and set the owner as testuser2
   > docker-compose exec om ozone sh bucket create /vol1/bucket2 --user 
testuser2 
   
   > docker-compose exec om ozone fs -ls /vol1                
   Found 2 items
   drwxrwxrwx   - testuser  testuser           0 2023-12-18 16:57 /vol1/bucket1
   drwxrwxrwx   - testuser2 testuser2          0 2023-12-18 16:57 /vol1/bucket2
   
   > docker-compose exec om ozone sh volume update --user testuser /vol1
   {
     "metadata" : { },
     "name" : "vol1",
     "admin" : "hadoop",
     "owner" : "testuser",
     "quotaInBytes" : -1,
     "quotaInNamespace" : -1,
     "usedNamespace" : 2,
     "creationTime" : "2023-12-18T16:57:07.500Z",
     "modificationTime" : "2023-12-18T16:57:40.318Z",
     "acls" : [ {
       "type" : "USER",
       "name" : "hadoop",
       "aclScope" : "ACCESS",
       "aclList" : [ "ALL" ]
     }, {
       "type" : "GROUP",
       "name" : "hadoop",
       "aclScope" : "ACCESS",
       "aclList" : [ "ALL" ]
     } ],
     "refCount" : 0
   }
   
   > docker-compose exec om ozone fs -ls /vol1
   Found 2 items
   drwxrwxrwx   - testuser  testuser           0 2023-12-18 16:57 /vol1/bucket1
   drwxrwxrwx   - testuser2 testuser2          0 2023-12-18 16:57 /vol1/bucket2
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to