Skip to content

HDDS-11747. Add ozone debug CLI to get keys that use certain containers#9469

Merged
sarvekshayr merged 4 commits into
apache:masterfrom
sarvekshayr:HDDS-11747
Jan 7, 2026
Merged

HDDS-11747. Add ozone debug CLI to get keys that use certain containers#9469
sarvekshayr merged 4 commits into
apache:masterfrom
sarvekshayr:HDDS-11747

Conversation

@sarvekshayr
Copy link
Copy Markdown
Contributor

@sarvekshayr sarvekshayr commented Dec 10, 2025

What changes were proposed in this pull request?

Often Recon is down or unable to process information for various reasons. In these cases, we need a fallback for its commonly used container to key mapping.

Added a debug command under om to support listing keys which are in a specific list of containers provided.

Usage: ozone debug om container-key-mapping [-hV] [--verbose]
       --containers=<containers> --db=<dbPath>

What is the link to the Apache JIRA

HDDS-11747

How was this patch tested?

bash-5.1$ ozone debug om container-key-mapping --db /data/metadata/om.db --containers 1,2
Note: A container can have both FSO and OBS keys. Currently this tool processes only FSO keys
{
  "containers" : {
    "1" : {
      "keys" : [ "vol1/buck1/key1" ],
      "numOfKeys" : 1
    },
    "2" : {
      "keys" : [ ],
      "numOfKeys" : 0
    }
  }
}

HDDS-11747. Add ozone debug CLI to get keys that use certain containers

Fix findbug
Copy link
Copy Markdown
Contributor

@sreejasahithi sreejasahithi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sarvekshayr for working on this

Copy link
Copy Markdown
Contributor

@ashishkumar50 ashishkumar50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarvekshayr Thanks for working on this. Why in this PR we are just processing FSO bucket keys and not all the keys(including OBS). Because a container can have either FSO or OBS or both. Are we planning in future PR to support OBS? If so we should clearly output in console that container can have keys which may belong to OBS, so that user is totally aware about that.

@sarvekshayr
Copy link
Copy Markdown
Contributor Author

Why in this PR we are just processing FSO bucket keys and not all the keys(including OBS). Because a container can have either FSO or OBS or both. Are we planning in future PR to support OBS? If so we should clearly output in console that container can have keys which may belong to OBS, so that user is totally aware about that.

Yes, support for OBS keys and additional flags will be done in a follow-up JIRA (HDDS-14118).
I’ll update the command description instead of adding this to the console output as it breaks jq parsing.

Copy link
Copy Markdown
Contributor

@ashishkumar50 ashishkumar50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, support for OBS keys and additional flags will be done in a follow-up JIRA (HDDS-14118).
I’ll update the command description instead of adding this to the console output as it breaks jq parsing.

It is fine as we are already implementing for OBS, otherwise we could have added in std err as followed in without impacting jq parse.

@errose28 errose28 self-requested a review December 11, 2025 18:15
@sarvekshayr sarvekshayr added the tools Tools that helps with debugging label Dec 12, 2025
Copy link
Copy Markdown
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarvekshayr Thanks for working over this, few comments

Copy link
Copy Markdown
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sarvekshayr sarvekshayr merged commit 0b8875b into apache:master Jan 7, 2026
43 checks passed
@sarvekshayr
Copy link
Copy Markdown
Contributor Author

Thanks @sumitagrawl, @ashishkumar50 and @sreejasahithi for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Tools that helps with debugging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants