Implement and test FsShell CLI commands for getfacl and setfacl.
FsShell CLI: add setfacl flags for ACL entry modification and removal.
FsShell CLI: add setfacl flag for removal of default ACL entries.
FsShell CLI: add support for recursive flag in ACL commands.
Fix bugs parsing ACL spec in FsShell setfacl.
setfacl -x fails to parse ACL spec if trying to remove the mask entry.
FsShell Cli: Add XML based End-to-End test for getfacl and setfacl commands
Attaching a patch for FsShell CLI implementations.
Tests needs to be updated after namenode implementations.
Hi, Vinayakumar B. Thank you again for volunteering to do this. I'll keep you informed as the rest of the implementation comes together and you'll be able to test the CLI end-to-end. Meanwhile, here are a couple of comments about the current patch that we'll want to address:
chmod 01777 sticky
# file: sticky/
# owner: cnauroth
# group: cnauroth
# flags: --t
setfacl -m user:vinay:rw-,default:user:cnauroth:r-- /file1
This means that the parsing logic needs to handle a split of length 3 or 4 (not just 3). If the length is 4, then the first element must be "default", and the parser handles this by setting default scope on the entry builder.
Thanks Chris for the detailed review and comments.
I have tried to address all your comments.
Regarding XML based tests, started working on it. Will update in a day or two as I am on travel as of now.
please have a look at updated patch. Thanks again
Thanks Vinay for working on this. I agree to wait until completion of core implementation to test end to end functionality with CLI.
For xml based tests you may want to see CLITestHelper. and you can also see TestCacheAdminCLI for example.
Please change getFSAction --> getFsAction
I think we have to raise separate umbrella JIRA for Common side for ACL changes and link to this parent JIRA of HDFS side changes?
Attaching the updated patch.
Addressed Uma's comment.
Updated stickybit printing based on OTHER's permission.
Both Vinayakumar B and Uma Maheswara Rao G requested a separate umbrella jira for Hadoop Common changes related to ACLs, so I've created HADOOP-10184 and converted a few issues to be sub-tasks of that. The FsShell CLI is now tracked as HADOOP-10187.
Vinay, thanks for incorporating the last round of feedback. Here are just 2 more comments. After this, you'll need to wait for some other patches to land before you can do end-to-end testing.
Updated the patch
FsCommand: Let's mention in the JavaDoc that it returns null if not found.
I didn't get this. Did you mean FsAction#getFsAction()? I have updated the Javadoc for this.
Also moved TestAclCommands to common code.
End-to-end xml-based test will be added in hdfs later. I will file a Jira for this.
Filed HDFS-5702 to track e2e tests
Sorry my last comment wasn't clear, but you're correct. Thank you for adding that to the Javadoc.
Thanks also for filing HDFS-5702. With that part separated, I think we can commit this patch to the feature branch. I'm planning to do a final review pass and commit later today.
+1 for the patch. I committed this to the HDFS-4685 feature branch. Vinay, thank you for the contribution. Uma, thank you for help with code review.