You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/06/29 10:32:30 UTC

[GitHub] [ozone] mohan3d commented on pull request #3568: HDDS-6938. handle NPE when removing prefixAcl

mohan3d commented on PR #3568:
URL: https://github.com/apache/ozone/pull/3568#issuecomment-1169815632

   Testing:
   
   ```bash
   bash-4.2$ kinit -kt /etc/security/keytabs/testuser.keytab testuser/scm@EXAMPLE.COM
   bash-4.2$ ozone shell volume create /vol1
   bash-4.2$ ozone shell bucket create /vol1/bucket1
   bash-4.2$ ozone shell key put /vol1/bucket1/prefix/key1 ./CONTRIBUTING.md
   bash-4.2$ ozone shell key put /vol1/bucket1/prefix/p/key2 ./CONTRIBUTING.md
   
   bash-4.2$ ozone shell prefix removeacl --acls=user:mohanad.elsafty:a /vol1/bucket1/prefix/
   PREFIX_NOT_FOUND No prefix info for the prefix path: /vol1/bucket1/prefix/
   
   bash-4.2$ ozone shell prefix removeacl --acls=user:mohanad.elsafty:a /vol1/bucket1/prefix/key1xyz
   PREFIX_NOT_FOUND No prefix info for the prefix path: /vol1/bucket1/prefix/key1xyz
   ```
   
   OMLog
   ```
   otocol.OzoneManagerProtocol
   om1_1        | 2022-06-29 10:24:02,415 [OM StateMachine ApplyTransaction Thread - 0] ERROR prefix.OMPrefixRemoveAclRequest: Remove acl [user:mohanad.elsafty:a[ACCESS]] to path /vol1/bucket1/prefix/ failed!
   om1_1        | PREFIX_NOT_FOUND org.apache.hadoop.ozone.om.exceptions.OMException: No prefix info for the prefix path: /vol1/bucket1/prefix/
   om1_1        | 	at org.apache.hadoop.ozone.om.request.key.acl.prefix.OMPrefixAclRequest.validateAndUpdateCache(OMPrefixAclRequest.java:98)
   om1_1        | 	at org.apache.hadoop.ozone.protocolPB.OzoneManagerRequestHandler.handleWriteRequest(OzoneManagerRequestHandler.java:293)
   om1_1        | 	at org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.runCommand(OzoneManagerStateMachine.java:529)
   om1_1        | 	at org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.lambda$1(OzoneManagerStateMachine.java:324)
   om1_1        | 	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
   om1_1        | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   om1_1        | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   om1_1        | 	at java.base/java.lang.Thread.run(Thread.java:829)
   om1_1        | 2022-06-29 10:24:16,204 [Socket Reader #1 for port 9862] INFO ipc.Server: Auth successful for testuser/scm@EXAMPLE.COM (auth:KERBEROS) from 172.25.0.116:52802
   om1_1        | 2022-06-29 10:24:16,219 [Socket Reader #1 for port 9862] INFO authorize.ServiceAuthorizationManager: Authorization successful for testuser/scm@EXAMPLE.COM (auth:KERBEROS) for protocol=interface org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol
   om1_1        | 2022-06-29 10:24:16,628 [OM StateMachine ApplyTransaction Thread - 0] ERROR prefix.OMPrefixRemoveAclRequest: Remove acl [user:mohanad.elsafty:a[ACCESS]] to path /vol1/bucket1/prefix/key1xyz failed!
   om1_1        | PREFIX_NOT_FOUND org.apache.hadoop.ozone.om.exceptions.OMException: No prefix info for the prefix path: /vol1/bucket1/prefix/key1xyz
   om1_1        | 	at org.apache.hadoop.ozone.om.request.key.acl.prefix.OMPrefixAclRequest.validateAndUpdateCache(OMPrefixAclRequest.java:98)
   om1_1        | 	at org.apache.hadoop.ozone.protocolPB.OzoneManagerRequestHandler.handleWriteRequest(OzoneManagerRequestHandler.java:293)
   om1_1        | 	at org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.runCommand(OzoneManagerStateMachine.java:529)
   om1_1        | 	at org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.lambda$1(OzoneManagerStateMachine.java:324)
   om1_1        | 	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
   om1_1        | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   om1_1        | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   om1_1        | 	at java.base/java.lang.Thread.run(Thread.java:829)
   ```
   
   Earlier before this update, the OM will be terminated due to NullPointerException at this [line](https://github.com/apache/ozone/blob/03c5f7868be6e1642e5dcf8a2c970d938542d234/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/acl/prefix/OMPrefixAclRequest.java#L114)
   
   
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org