This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new c5da9e2a86d HDDS-13137. Include services to be stopped for `ozone 
repair` in command description (#9217)
c5da9e2a86d is described below

commit c5da9e2a86dd55e9d0d8aaa5f3849e7a3008568e
Author: sreejasahithi <[email protected]>
AuthorDate: Fri Nov 7 20:34:41 2025 +0530

    HDDS-13137. Include services to be stopped for `ozone repair` in command 
description (#9217)
---
 hadoop-hdds/docs/content/tools/Repair.md           | 42 +++++++++++++---------
 .../apache/hadoop/ozone/repair/OzoneRepair.java    |  4 +--
 .../hadoop/ozone/repair/TransactionInfoRepair.java |  3 +-
 .../schemaupgrade/UpgradeContainerSchema.java      |  4 +--
 .../ozone/repair/ldb/RocksDBManualCompaction.java  |  3 +-
 .../apache/hadoop/ozone/repair/om/CompactOMDB.java |  3 +-
 .../hadoop/ozone/repair/om/FSORepairTool.java      |  2 +-
 .../hadoop/ozone/repair/om/OMRatisLogRepair.java   |  3 +-
 .../ozone/repair/om/SnapshotChainRepair.java       |  1 +
 .../hadoop/ozone/repair/om/quota/QuotaRepair.java  |  2 +-
 .../repair/scm/cert/RecoverSCMCertificate.java     |  3 +-
 11 files changed, 43 insertions(+), 27 deletions(-)

diff --git a/hadoop-hdds/docs/content/tools/Repair.md 
b/hadoop-hdds/docs/content/tools/Repair.md
index 002b163773c..d3368e8b40b 100644
--- a/hadoop-hdds/docs/content/tools/Repair.md
+++ b/hadoop-hdds/docs/content/tools/Repair.md
@@ -20,15 +20,15 @@ summary: Advanced tool to repair Ozone.
   limitations under the License.
 -->
 
-Ozone Repair (`ozone repair`) is an advanced tool to repair Ozone. The nodes 
being repaired must be stopped before the tool is run.
+Ozone Repair (`ozone repair`) is an advanced tool to repair Ozone. Check the 
`--help` output of the subcommand for the respective role status requirements.
 Note: All repair commands support a `--dry-run` option which allows a user to 
see what repair the command will be performing without actually making any 
changes to the cluster.
 Use the `--force` flag to override the running service check in false-positive 
cases.
 
 ```bash
 Usage: ozone repair [-hV] [--verbose] [-conf=<configurationPath>]
                     [-D=<String=String>]... [COMMAND]
-Advanced tool to repair Ozone. The nodes being repaired must be stopped before
-the tool is run.
+Advanced tool to repair Ozone. Check the --help output of the subcommand for
+the respective role status requirements.
       -conf=<configurationPath>
 
   -D, --set=<String=String>
@@ -50,18 +50,21 @@ Operational tool to repair datanode.
 ### upgrade-container-schema
 Upgrade all schema V2 containers to schema V3 for a datanode in offline mode.
 Optionally takes `--volume` option to specify which volume needs the upgrade.
+Datanode should be stopped before running this tool.
 
 ## ozone repair ldb
 Operational tool to repair ldb.
 
 ### compact
 Compact a column family in the DB to clean up tombstones while the service is 
offline.
+The corresponding OM, SCM or Datanode role should be stopped before running 
this tool.
 ```bash
 Usage: ozone repair ldb compact [-hV] [--dry-run] [--force] [--verbose]
                                 --cf=<columnFamilyName> --db=<dbPath>
 CLI to compact a column-family in the DB while the service is offline.
 Note: If om.db is compacted with this tool then it will negatively impact the
-Ozone Manager\'s efficient snapshot diff.
+Ozone Manager\'s efficient snapshot diff. The corresponding OM, SCM or Datanode
+role should be stopped for this tool.
       --cf, --column-family, --column_family=<columnFamilyName>
                       Column family name
       --db=<dbPath>   Database File Path
@@ -81,13 +84,13 @@ Operational tool to repair OM.
 ### fso-tree
 Identify and repair a disconnected FSO tree by marking unreferenced entries 
for deletion.
 Reports the reachable, unreachable (pending delete) and unreferenced 
(orphaned) directories and files.
-OM should be stopped while this tool is run.
+OM should be stopped before running this tool.
 ```bash
 Usage: ozone repair om fso-tree [-hV] [--dry-run] [--force] [--verbose]
                                 [-b=<bucketFilter>] --db=<omDBPath>
                                 [-v=<volumeFilter>]
 Identify and repair a disconnected FSO tree by marking unreferenced entries for
-deletion. OM should be stopped while this tool is run.
+deletion. OM should be stopped for this tool.
   -b, --bucket=<bucketFilter>
                         Filter by bucket name
       --db=<omDBPath>   Path to OM RocksDB
@@ -100,6 +103,7 @@ Subcommand for all snapshot related repairs.
 
 #### chain
 Update global and path previous snapshot for a snapshot in case snapshot chain 
is corrupted.
+OM should be stopped before running this tool.
 ```bash
 Usage: ozone repair om snapshot chain [-hV] [--dry-run] [--force] [--verbose]
                                       --db=<dbPath>
@@ -107,7 +111,7 @@ Usage: ozone repair om snapshot chain [-hV] [--dry-run] 
[--force] [--verbose]
                                       --pp=<pathPreviousSnapshotId> <value>
                                       <snapshotName>
 CLI to update global and path previous snapshot for a snapshot in case snapshot
-chain is corrupted.
+chain is corrupted. OM should be stopped for this tool.
       <value>          URI of the bucket (format: volume/bucket).
       <snapshotName>   Snapshot name to update
       --db=<dbPath>    Database File Path
@@ -119,12 +123,13 @@ chain is corrupted.
 
 ### update-transaction
 To avoid modifying Ratis logs and only update the latest applied transaction, 
use `update-transaction` command. 
-This updates the highest transaction index in the OM transaction info table.
+This updates the highest transaction index in the OM transaction info table. 
The OM role should be stopped before running this tool.
 ```bash
 Usage: ozone repair om update-transaction [-hV] [--dry-run] [--force]
        [--verbose] --db=<dbPath> --index=<highestTransactionIndex>
        --term=<highestTransactionTerm>
-CLI to update the highest index in transaction info table.
+CLI to update the highest index in transaction info table. The corresponding OM
+or SCM role should be stopped for this tool.
       --db=<dbPath>   Database File Path
       --index=<highestTransactionIndex>
                       Highest index to set. The input should be non-zero long
@@ -135,7 +140,7 @@ CLI to update the highest index in transaction info table.
 ```
 
 ### quota
-Operational tool to repair quota in OM DB.
+Operational tool to repair quota in OM DB. OM should be running for this tool.
 
 #### start
 To trigger quota repair use the `start` command.
@@ -177,12 +182,13 @@ CLI to get the status of last trigger quota repair if 
available.
 
 ### compact
 Compact a column family in the OM DB to clean up tombstones. The compaction 
happens asynchronously. Requires admin privileges.
+OM should be running for this tool.
 ```bash
 Usage: ozone repair om compact [-hV] [--dry-run] [--force] [--verbose]
                                --cf=<columnFamilyName> [--node-id=<nodeId>]
                                [--service-id=<omServiceId>]
 CLI to compact a column family in the om.db. The compaction happens
-asynchronously. Requires admin privileges.
+asynchronously. Requires admin privileges. OM should be running for this tool.
       --cf, --column-family, --column_family=<columnFamilyName>
                            Column family name
       --node-id=<nodeId>   NodeID of the OM for which db needs to be compacted.
@@ -194,6 +200,7 @@ asynchronously. Requires admin privileges.
 Omit a raft log in a ratis segment file by replacing the specified index with 
a dummy EchoOM command. 
 This is an offline tool meant to be used only when all 3 OMs crash on the same 
transaction. 
 If the issue is isolated to one OM, manually copy the DB from a healthy OM 
instead.
+OM should be stopped before running this tool.
 ```bash
 Usage: ozone repair om skip-ratis-transaction [-hV] [--dry-run] [--force]
        [--verbose] -b=<backupDir> --index=<index> (-s=<segmentFile> |
@@ -204,7 +211,8 @@ an offline command i.e., doesn\'t require OM to be running. 
The command should
 be run for the same transaction on all 3 OMs only when all the OMs are crashing
 while applying the same transaction. If only one OM is crashing and the other
 OMs have executed the log successfully, then the DB should be manually copied
-from one of the good OMs to the crashing OM instead.
+from one of the good OMs to the crashing OM instead. OM should be stopped for
+this tool.
   -b, --backup=<backupDir>   Directory to put the backup of the original
                                repaired segment file before the repair.
   -d, --ratis-log-dir=<logDir>
@@ -226,22 +234,24 @@ Operational tool to repair SCM.
 Subcommand for all certificate related repairs on SCM
 
 #### recover
-Recover Deleted SCM Certificate from RocksDB
+Recover Deleted SCM Certificate from RocksDB. SCM should be stopped before 
running this tool.
 ```bash
 Usage: ozone repair scm cert recover [-hV] [--dry-run] [--force] [--verbose]
                                      --db=<dbPath>
-Recover Deleted SCM Certificate from RocksDB
+Recover Deleted SCM Certificate from RocksDB. SCM should be stopped for this
+tool.
       --db=<dbPath>   SCM DB Path
 ```
 
 ### update-transaction
 To avoid modifying Ratis logs and only update the latest applied transaction, 
use `update-transaction` command.
-This updates the highest transaction index in the SCM transaction info table.
+This updates the highest transaction index in the SCM transaction info table. 
The SCM role should be stopped before running this tool.
 ```bash
 Usage: ozone repair scm update-transaction [-hV] [--dry-run] [--force]
        [--verbose] --db=<dbPath> --index=<highestTransactionIndex>
        --term=<highestTransactionTerm>
-CLI to update the highest index in transaction info table.
+CLI to update the highest index in transaction info table. The corresponding OM
+or SCM role should be stopped for this tool.
       --db=<dbPath>   Database File Path
       --index=<highestTransactionIndex>
                       Highest index to set. The input should be non-zero long
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java
index 50e953956fb..60c85950b42 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java
@@ -27,8 +27,8 @@
  * Ozone Repair Command line tool.
  */
 @CommandLine.Command(name = "ozone repair",
-    description = "Advanced tool to repair Ozone. The nodes being repaired " +
-        "must be stopped before the tool is run.",
+    description = "Advanced tool to repair Ozone. Check the --help output of 
the subcommand " +
+        "for the respective role status requirements.",
     versionProvider = HddsVersionProvider.class,
     mixinStandardHelpOptions = true)
 public class OzoneRepair extends GenericCli implements ExtensibleParentCommand 
{
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/TransactionInfoRepair.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/TransactionInfoRepair.java
index 2bb107f4a5b..dcff4841084 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/TransactionInfoRepair.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/TransactionInfoRepair.java
@@ -44,7 +44,8 @@
  */
 @CommandLine.Command(
     name = "update-transaction",
-    description = "CLI to update the highest index in transaction info table.",
+    description = "CLI to update the highest index in transaction info table." 
+
+        " The corresponding OM or SCM role should be stopped for this tool.",
     mixinStandardHelpOptions = true,
     versionProvider = HddsVersionProvider.class
 )
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/datanode/schemaupgrade/UpgradeContainerSchema.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/datanode/schemaupgrade/UpgradeContainerSchema.java
index 7a8fc81504d..6f5fc842152 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/datanode/schemaupgrade/UpgradeContainerSchema.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/datanode/schemaupgrade/UpgradeContainerSchema.java
@@ -73,8 +73,8 @@
  */
 @Command(
     name = "upgrade-container-schema",
-    description = "Offline upgrade all schema V2 containers to schema V3 " +
-        "for this datanode.",
+    description = "Offline upgrade all schema V2 containers to schema V3 for 
this datanode." + 
+        " Datanode should be stopped for this tool.",
     mixinStandardHelpOptions = true,
     versionProvider = HddsVersionProvider.class)
 public class UpgradeContainerSchema extends RepairTool {
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java
index 3a5d1ad4da1..5b6662805af 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/ldb/RocksDBManualCompaction.java
@@ -41,7 +41,8 @@
     name = "compact",
     description = "CLI to compact a column-family in the DB while the service 
is offline.\n" +
         "Note: If om.db is compacted with this tool then it will negatively 
impact " +
-        "the Ozone Manager's efficient snapshot diff.",
+        "the Ozone Manager's efficient snapshot diff." + 
+        " The corresponding OM, SCM or Datanode role should be stopped for 
this tool.",
     mixinStandardHelpOptions = true,
     versionProvider = HddsVersionProvider.class
 )
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/CompactOMDB.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/CompactOMDB.java
index 87c5140c03b..ae3f421c1a1 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/CompactOMDB.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/CompactOMDB.java
@@ -32,7 +32,8 @@
 @CommandLine.Command(
     name = "compact",
     description = "CLI to compact a column family in the om.db. " +
-        "The compaction happens asynchronously. Requires admin privileges.",
+        "The compaction happens asynchronously. Requires admin privileges." +
+        " OM should be running for this tool.",
     mixinStandardHelpOptions = true,
     versionProvider = HddsVersionProvider.class
 )
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/FSORepairTool.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/FSORepairTool.java
index cf7eb997f32..e9b1a2283a8 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/FSORepairTool.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/FSORepairTool.java
@@ -82,7 +82,7 @@
 @CommandLine.Command(
     name = "fso-tree",
     description = "Identify and repair a disconnected FSO tree by marking 
unreferenced (orphaned) entries for " +
-        "deletion. OM should be stopped while this tool is run."
+        "deletion. OM should be stopped for this tool."
 )
 public class FSORepairTool extends RepairTool {
   private static final Logger LOG = 
LoggerFactory.getLogger(FSORepairTool.class);
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRatisLogRepair.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRatisLogRepair.java
index 61bfa3ccc4f..c1643efa9ce 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRatisLogRepair.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/OMRatisLogRepair.java
@@ -51,7 +51,8 @@
         "The command should be run for the same transaction on all 3 OMs only 
when all the OMs are crashing " +
         "while applying the same transaction. If only one OM is crashing and 
the " +
         "other OMs have executed the log successfully, then the DB should be 
manually copied " +
-        "from one of the good OMs to the crashing OM instead.",
+        "from one of the good OMs to the crashing OM instead." + 
+        " OM should be stopped for this tool.",
     mixinStandardHelpOptions = true,
     versionProvider = HddsVersionProvider.class
 )
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/SnapshotChainRepair.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/SnapshotChainRepair.java
index adb900ada1f..fd0a3869eb7 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/SnapshotChainRepair.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/SnapshotChainRepair.java
@@ -51,6 +51,7 @@
 @CommandLine.Command(
     name = "chain",
     description = "CLI to update global and path previous snapshot for a 
snapshot in case snapshot chain is corrupted."
+        + " OM should be stopped for this tool."
 )
 public class SnapshotChainRepair extends RepairTool {
 
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/quota/QuotaRepair.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/quota/QuotaRepair.java
index cc6e87b63d4..7ec81389dc6 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/quota/QuotaRepair.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/quota/QuotaRepair.java
@@ -44,7 +44,7 @@
         QuotaStatus.class,
         QuotaTrigger.class,
     },
-    description = "Operational tool to repair quota in OM DB.")
+    description = "Operational tool to repair quota in OM DB. OM should be 
running for this tool.")
 public class QuotaRepair extends AbstractSubcommand {
 
   public OzoneManagerProtocolClientSideTranslatorPB createOmClient(
diff --git 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/cert/RecoverSCMCertificate.java
 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/cert/RecoverSCMCertificate.java
index f6a9759a3e9..8f1dec19a8b 100644
--- 
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/cert/RecoverSCMCertificate.java
+++ 
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/scm/cert/RecoverSCMCertificate.java
@@ -63,7 +63,8 @@
  */
 @CommandLine.Command(
     name = "recover",
-    description = "Recover Deleted SCM Certificate from RocksDB")
+    description = "Recover Deleted SCM Certificate from RocksDB."  +
+        " SCM should be stopped for this tool.")
 public class RecoverSCMCertificate extends RepairTool {
   @CommandLine.Option(names = {"--db"},
       required = true,


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

Reply via email to