Skip to content

HDDS-12041. Add ozone repair scm cert command and its subcommand #7671

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

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

sarvekshayr
Copy link
Contributor

What changes were proposed in this pull request?

ozone repair scm - These commands make repairs to an individual SCM instance.

  • ozone repair scm cert
    A dedicated subcommand for all certificate related repairs on SCM we may need now or in the future.
  • ozone repair scm cert recover
    The new location of ozone repair cert-recover

What is the link to the Apache JIRA

HDDS-12041

How was this patch tested?

Tested the patch on a docker cluster.

bash-5.1$ ozone repair scm
...
Usage: ozone repair scm [COMMAND]
Operational tool to repair SCM.
Commands:
  cert  Subcommand for all certificate related repairs on SCM
bash-5.1$ ozone repair scm cert recover
...
Missing required option: '--db=<dbPath>'
Usage: ozone repair scm cert recover [-hV] [--force] --db=<dbPath>
Recover Deleted SCM Certificate from RocksDB
      --db=<dbPath>   SCM DB Path
      --force         Use this flag if you want to bypass the check in
                        false-positive cases.
  -h, --help          Show this help message and exit.
  -V, --version       Print version information and exit.
bash-5.1$ ozone repair scm cert recover --db /data/metadata/scm.db
ATTENTION: Running as user hadoop. Make sure this is the same user used to run the Ozone process. Are you sure you want to continue (y/N)? y
Run as user: hadoop
Error: SCM is currently running on this host. Stop the service before running the repair tool.
bash-5.1$ ozone repair scm cert recover --db /data/metadata/scm.db --force
ATTENTION: Running as user hadoop. Make sure this is the same user used to run the Ozone process. Are you sure you want to continue (y/N)? y
Run as user: hadoop
Warning: --force flag used. Proceeding despite SCM being detected as running.
All Certs in DB : []
Host: 6f869b54ec3e
Sub CA Cert not found in the DB for this host, Certs in the DB : []

HDDS-12041. Add ozone repair scm cert command and its subcommand

Added license header to CertRepair
@adoroszlai adoroszlai added the tools Tools that helps with debugging label Jan 9, 2025
@adoroszlai adoroszlai merged commit 7c13de8 into apache:master Jan 10, 2025
42 checks passed
@adoroszlai
Copy link
Contributor

Thanks @sarvekshayr for the patch.

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.

2 participants