Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-12029. Move ozone debug recover to ozone admin om lease recover #7670

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sarvekshayr
Copy link
Contributor

What changes were proposed in this pull request?

The ozone debug recover command that is currently used for lease recovery has a few problems:

  • It modifies the cluster, so it should not be under debug.
  • The name does not specify that it deals with leases.
  • It uses a standard API from the FileSystem interface unlike other low level tools in this package.

The command is unique because it goes through the FileSystem interface but is not exposed through the fs command line in Hadoop or Ozone. For these reasons, we propose moving this command to its own Ozone subcommand: ozone admin om lease recover. This also allows other lease related subcommands (like querying of existing leases) to be added in the future.

What is the link to the Apache JIRA

HDDS-12029

How was this patch tested?

Tested the patch on a docker cluster.

bash-5.1$ ozone admin om lease
Missing required subcommand
Usage: ozone admin om lease [COMMAND]
Command for all lease related queries.
Commands:
  recover  Recover the lease of a specified file. Make sure to specify file
             system scheme if ofs:// is not the default.
bash-5.1$ ozone admin om lease recover --path=/vol1/bucket1/key1
Lease recovery SUCCEEDED on /vol1/bucket1/key1

Copy link
Contributor

@adoroszlai adoroszlai 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 the patch.

@errose28 errose28 added the tools Tools that helps with debugging label Jan 9, 2025
@errose28 errose28 requested review from jojochuang and smengcl January 9, 2025 14:41
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.

3 participants