[
https://issues.apache.org/jira/browse/HDDS-12075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rishabh Patel updated HDDS-12075:
---------------------------------
Description:
Key names may include arbitrary number of {{/}} characters, such as
{{{{{}/volumename/bucketname/test1/test2{}}}.}}
The read-replicas command assumes key names will be single level or not include
any {{/}} characters. This results in failures when the command is run on
multilevel keys.
{code:java}
bash-5.1$ ozone debug --verbose read-replicas /ockrwvolume/ockrwbucket/rmp/1 -o
/var/log/hadoop
Volume Name : ockrwvolume
Bucket Name : ockrwbucket
Key Name : rmp/1
Creating directory : ockrwvolume_ockrwbucket_rmp/1_20250113204921
java.io.IOException: Failed to create directory
/var/log/hadoop/ockrwvolume_ockrwbucket_rmp/1_20250113204921.
at
org.apache.hadoop.ozone.debug.ReadReplicas.createDirectory(ReadReplicas.java:240)
at
org.apache.hadoop.ozone.debug.ReadReplicas.execute(ReadReplicas.java:113)
at org.apache.hadoop.ozone.shell.Handler.call(Handler.java:78)
at org.apache.hadoop.ozone.shell.Handler.call(Handler.java:40)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at
picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at
picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:83)
at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:74)
at org.apache.hadoop.ozone.shell.Shell.lambda$run$0(Shell.java:92)
at
org.apache.hadoop.hdds.tracing.TracingUtil.executeInSpan(TracingUtil.java:184)
at
org.apache.hadoop.hdds.tracing.TracingUtil.executeInNewSpan(TracingUtil.java:149)
at org.apache.hadoop.ozone.shell.Shell.run(Shell.java:92)
at org.apache.hadoop.ozone.debug.OzoneDebug.main(OzoneDebug.java:37)
{code}
was:
Key names may include arbitrary number of {{/}} characters, such as
{{{{{}/volumename/bucketname/test1/test2{}}}.}}
The read-replicas command assumes key names will be single level or not include
any {{/}} characters. This results in failures when the command is run on
multilevel keys.
> Ozone debug read-replicas command fails when there is a slash character in
> key names
> ------------------------------------------------------------------------------------
>
> Key: HDDS-12075
> URL: https://issues.apache.org/jira/browse/HDDS-12075
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Rishabh Patel
> Assignee: Rishabh Patel
> Priority: Major
> Labels: pull-request-available
>
> Key names may include arbitrary number of {{/}} characters, such as
> {{{{{}/volumename/bucketname/test1/test2{}}}.}}
> The read-replicas command assumes key names will be single level or not
> include any {{/}} characters. This results in failures when the command is
> run on multilevel keys.
>
> {code:java}
> bash-5.1$ ozone debug --verbose read-replicas /ockrwvolume/ockrwbucket/rmp/1
> -o /var/log/hadoop
> Volume Name : ockrwvolume
> Bucket Name : ockrwbucket
> Key Name : rmp/1
> Creating directory : ockrwvolume_ockrwbucket_rmp/1_20250113204921
> java.io.IOException: Failed to create directory
> /var/log/hadoop/ockrwvolume_ockrwbucket_rmp/1_20250113204921.
> at
> org.apache.hadoop.ozone.debug.ReadReplicas.createDirectory(ReadReplicas.java:240)
> at
> org.apache.hadoop.ozone.debug.ReadReplicas.execute(ReadReplicas.java:113)
> at org.apache.hadoop.ozone.shell.Handler.call(Handler.java:78)
> at org.apache.hadoop.ozone.shell.Handler.call(Handler.java:40)
> at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
> at picocli.CommandLine.access$1500(CommandLine.java:148)
> at
> picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
> at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
> at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
> at
> picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
> at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
> at picocli.CommandLine.execute(CommandLine.java:2170)
> at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:83)
> at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:74)
> at org.apache.hadoop.ozone.shell.Shell.lambda$run$0(Shell.java:92)
> at
> org.apache.hadoop.hdds.tracing.TracingUtil.executeInSpan(TracingUtil.java:184)
> at
> org.apache.hadoop.hdds.tracing.TracingUtil.executeInNewSpan(TracingUtil.java:149)
> at org.apache.hadoop.ozone.shell.Shell.run(Shell.java:92)
> at org.apache.hadoop.ozone.debug.OzoneDebug.main(OzoneDebug.java:37)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]