You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "mingchao zhao (Jira)" <ji...@apache.org> on 2020/04/24 09:56:00 UTC

[jira] [Commented] (HDDS-3457) When ACL enable, use ozonefs put key will get OMException: Key not found, checkAccess failed.

    [ https://issues.apache.org/jira/browse/HDDS-3457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091410#comment-17091410 ] 

mingchao zhao commented on HDDS-3457:
-------------------------------------

After acl is enabled, the above exception is also present when we use hive. Here the stack is more detailed

Logging initialized using configuration in jar:file:/data/home/micahzhao/hive-2.3.3/lib/hive-common-2.3.3.jar!/hive-log4j2.properties Async: true
Exception in thread "main" java.lang.RuntimeException: KEY_NOT_FOUND org.apache.hadoop.ozone.om.exceptions.OMException: Key not found, checkAccess failed. Key:/hadoop/bucket/tmp/hive
 at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:606)
 at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:549)
 at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:750)
 at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
 at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
Caused by: KEY_NOT_FOUND org.apache.hadoop.ozone.om.exceptions.OMException: Key not found, checkAccess failed. Key:/hadoop/bucket/tmp/hive
 at org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.handleError(OzoneManagerProtocolClientSideTranslatorPB.java:805)
 at org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.getFileStatus(OzoneManagerProtocolClientSideTranslatorPB.java:1426)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.hadoop.hdds.tracing.TraceAllMethod.invoke(TraceAllMethod.java:71)
 at com.sun.proxy.$Proxy34.getFileStatus(Unknown Source)
 at org.apache.hadoop.ozone.client.rpc.RpcClient.getOzoneFileStatus(RpcClient.java:1015)
 at org.apache.hadoop.ozone.client.OzoneBucket.getFileStatus(OzoneBucket.java:490)
 at org.apache.hadoop.fs.ozone.BasicOzoneClientAdapterImpl.getFileStatus(BasicOzoneClientAdapterImpl.java:296)
 at org.apache.hadoop.fs.ozone.BasicOzoneFileSystem.getFileStatus(BasicOzoneFileSystem.java:641)
 at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1437)
 at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:704)
 at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:650)
 at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:582)
 ... 9 more

> When ACL enable, use ozonefs put key will get OMException: Key not found, checkAccess failed. 
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDDS-3457
>                 URL: https://issues.apache.org/jira/browse/HDDS-3457
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: om, Ozone Filesystem
>            Reporter: mingchao zhao
>            Priority: Major
>         Attachments: image-2020-04-20-15-37-18-655.png
>
>
> When enable acl, I get OMException: Key not found, checkAccess failed,when I use ozonefs put file.
> !image-2020-04-20-15-37-18-655.png|width=820,height=47!
> When the acl is enabled, I find that the background needs to checkaccess to check for acl permissions. This will get [FileStatus|https://github.com/apache/hadoop-ozone/blob/56def9f0b8c89588a8008e21e299047e3cbeb37a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L1604] first, and when the key does Not exist, the "Key Not Found exception" will appear.
> As currently implemented, we would never be able to put file through ozoneFS after the enable acl. Unless the file already exists, we override it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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