[
https://issues.apache.org/jira/browse/HDDS-12758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Andika updated HDDS-12758:
-------------------------------
Target Version/s: 1.4.2, 2.0.1 (was: 2.0.1)
> Error in OmUtils.normalizeKey for key name starting with //
> -----------------------------------------------------------
>
> Key: HDDS-12758
> URL: https://issues.apache.org/jira/browse/HDDS-12758
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Manager, s3gateway
> Reporter: ChenXi
> Assignee: ChenXi
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.1.0
>
>
> # ozone sh bucket info s3v/bucket-fso
> # aws s3api put-object --bucket bucket-fso --key //dir1 --body /etc/hosts
> --endpoint http://localhost:9878
>
> Error on the OM
> ```
> 2025-04-03 17:46:02,186 WARN ipc.Server (Server.java:logException(3258)) -
> IPC Server handler 33 on default port 9862, call Call#10 Retry#18
> org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol.submitRequest from
> 127.0.0.1:62768
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> at java.lang.String.substring(String.java:1931)
> at org.apache.hadoop.ozone.OmUtils.normalizeKey(OmUtils.java:776)
> at
> org.apache.hadoop.ozone.om.request.OMClientRequest.validateAndNormalizeKey(OMClientRequest.java:541)
> at
> org.apache.hadoop.ozone.om.request.OMClientRequest.validateAndNormalizeKey(OMClientRequest.java:518)
> at
> org.apache.hadoop.ozone.om.request.OMClientRequest.validateAndNormalizeKey(OMClientRequest.java:528)
> at
> org.apache.hadoop.ozone.om.request.key.OMKeyCreateRequest.preExecute(OMKeyCreateRequest.java:101)
> at
> org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.lambda$5(OzoneManagerProtocolServerSideTranslatorPB.java:210)
> at
> org.apache.hadoop.ozone.util.MetricUtil.captureLatencyNs(MetricUtil.java:45)
> at
> org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.preExecute(OzoneManagerProtocolServerSideTranslatorPB.java:209)
> at
> org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.internalProcessRequest(OzoneManagerProtocolServerSideTranslatorPB.java:187)
> at
> org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.processRequest(OzoneManagerProtocolServerSideTranslatorPB.java:127)
> at
> org.apache.hadoop.hdds.server.OzoneProtocolMessageDispatcher.processRequest(OzoneProtocolMessageDispatcher.java:87)
> at
> org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.submitRequest(OzoneManagerProtocolServerSideTranslatorPB.java:118)
> at
> org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos$OzoneManagerService$2.callBlockingMethod(OzoneManagerProtocolProtos.java)
> at
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server.processCall(ProtobufRpcEngine.java:484)
> at
> org.apache.hadoop.ipc.ProtobufRpcEngine2$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:595)
> at
> org.apache.hadoop.ipc.ProtobufRpcEngine2$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:573)
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1227)
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:1246)
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:1169)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:422)
> at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1953)
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:3198)
> ```
>
> The root cause is
> Path parsing where paths starting with "//" have the content after "//"
> interpreted as the URI authority rather than as part of the path.
> For example: Path("//dir1").toUri().getAuthority() returns "dir1" and
> getPath() returns ""
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]