[
https://issues.apache.org/jira/browse/HDDS-9610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792793#comment-17792793
]
Christos Bisias commented on HDDS-9610:
---------------------------------------
[~aryangupta1998] I get your point and I also went through your PR and the
review comments. The current approach isn't able to address the corner cases,
but this is still a valid issue. We are using FSO but we can't say to any user
that wants to use LEGACY, there are issues, we know about them, use FSO
instead. This Jira shouldn't be RESOLVED.
> Recursive fs delete on a Legacy bucket succeeds even if no keys were deleted
> ----------------------------------------------------------------------------
>
> Key: HDDS-9610
> URL: https://issues.apache.org/jira/browse/HDDS-9610
> Project: Apache Ozone
> Issue Type: Bug
> Components: OFS, Ozone CLI
> Reporter: Christos Bisias
> Assignee: Aryan Gupta
> Priority: Major
> Labels: pull-request-available
>
> For a Legacy bucket, recursive delete might appear successful even if no keys
> were actually deleted.
> The issue can be reproduced in the docker dev env. Edit *docker-config* to
> enable native ACLs
> {noformat}
> OZONE-SITE.XML_ozone.acl.enabled=true
> OZONE-SITE.XML_ozone.acl.authorizer.class=org.apache.hadoop.ozone.security.acl.OzoneNativeAuthorizer{noformat}
> Start the docker env and run the commands below
> {code:java}
> > docker-compose exec -T om ozone sh volume create /vol1
> > docker-compose exec -T om ozone sh bucket create /vol1/bucket1 -l LEGACY
> > docker-compose exec -T om ozone sh volume setacl -a
> > user:testuser2:rw,user:testuser:a,group:testuser2:rw,group:testuser:a vol1
> ACLs set successfully.
> > docker-compose exec -T om ozone sh bucket setacl -a
> > user:testuser2:rwlc,user:testuser:a,group:testuser2:rwlc,group:testuser:a
> > vol1/bucket1
> ACLs set successfully.
> > docker-compose exec -T -u testuser om ozone fs -mkdir /vol1/bucket1/dir1
> > docker-compose exec -T -u testuser om ozone fs -put ./README.md
> > /vol1/bucket1/dir1/readme
> > docker-compose exec -T -u testuser2 om ozone fs -rm -r -skipTrash
> > /vol1/bucket1/dir1
> Deleted /vol1/bucket1/dir1
> > docker-compose exec -T -u testuser om ozone fs -ls /vol1/bucket1/dir1
> Found 1 items
> -rw-rw-rw- 3 testuser testuser 4068 2023-11-02 16:53
> /vol1/bucket1/dir1/readme {code}
> This is happening because inĀ
> *BasicRootedOzoneFileSystem* we are processing keys one by one and if there
> is a recursive flag, we ignore whether the key was deleted or not, just to
> continue with processing the next iteration. The result should be a success
> only if all keys were successfully deleted.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]