sarvekshayr opened a new pull request, #7671:
URL: https://github.com/apache/ozone/pull/7671

   ## 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](https://issues.apache.org/jira/browse/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 : []
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to