[
https://issues.apache.org/jira/browse/HDDS-13796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18030115#comment-18030115
]
Ethan Rose commented on HDDS-13796:
-----------------------------------
{quote}The problem is when the command fails or returns silently with no
explanation.
{quote}
Is there an example of this happening? IME if the glob is not expanded because
it is not surrounded by whitespace you will get an error saying the DB is not
found, and the error will include the path that was provided. With this output
you can see the glob was not expanded.
{quote}This is problematic as the command help description or any other
documentation does not call out the difference in behavior.
{quote}
There are lots of edge cases with how command invocations and the shell
interact. I don't think we should attempt to document all of them. I haven't
seen other CLI tools do this to suggest it is a standard practice.
We could potentially put a call-out in the tools docs on the website, but I
don't think there's anything actionable in the Ozone code for this.
> Globbing does not expand the parameters
> ---------------------------------------
>
> Key: HDDS-13796
> URL: https://issues.apache.org/jira/browse/HDDS-13796
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Rishabh Patel
> Assignee: Rishabh Patel
> Priority: Major
>
> There are several places in the Ozone CLI which accept a local file path as a
> parameter.
> Consider the ozone debug ldb command which needs a path to a RocksDB instance.
> When the path is provided in the form {{{}`--db=fullPath`{}}}, the command
> works
> {code:java}
> bash-5.1$ ozone debug ldb
> --db=/data/hdds/hdds/CID-ac134998-b544-4bfb-be77-50e0f17ce2ad/DS-208d40b1-45f6-4200-aabc-a231ec5a2a04/container.db
> ls
> default
> delete_txns
> finalize_blocks
> block_data
> metadata
> last_chunk_info
> {code}
> When the path is provided after an {{`=`}} sign, {{{}`--db=path*`{}}}, the
> command does *not* work.
> {code:java}
> bash-5.1$ ozone debug ldb --db=/data/hdds/hdds/CID-*/DS-*/container.db
> ls{code}
> When the path is provided after a space, {{{}`--db path*`{}}}, the command
> works.
> {code:java}
> bash-5.1$ ozone debug ldb --db /data/hdds/hdds/CID-*/DS-*/container.db ls
> default
> delete_txns
> finalize_blocks
> block_data
> metadata
> last_chunk_info{code}
> [~erose] pointed out that the shell path does not expand when it is provided
> as a parameter after the `=` sign.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]