You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sarvekshayr (via GitHub)" <gi...@apache.org> on 2025/11/05 05:02:38 UTC

[PR] HDDS-13873. Block ozone repair if service is running and skip check in dry run mode [ozone]

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

   ## What changes were proposed in this pull request?
   - Added `serviceToBeOffline()` check in  `OMRatisLogRepair` to ensure OM is stopped before running the tool.
   
   - `RocksDBManualCompaction` is a generic RocksDB compaction tool that can be used for ANY RocksDB database. Added a warning to ensure users stop the service before running compaction.
   
   - Repair tools expected the service to be offline even in dry-mode run. Modified the logic to skip the check in dry-run mode so we can get the output without stopping the service.
   
   ## What is the link to the Apache JIRA
   [HDDS-13873](https://issues.apache.org/jira/browse/HDDS-13873)
   
   ## How was this patch tested?
   CI: https://github.com/sarvekshayr/ozone/actions/runs/19090517877/job/54540755499
   Modified related tests and tested on docker as well.
   
   `OMRatisLogRepair`
   ```
   bash-5.1$ ozone repair om skip-ratis-transaction -b /tmp --index 2 -s /data/metadata/ratis/bf265839-605b-3f16-9796-c5ba1605619e/current/log_inprogress_0 --dry-run
   [dry run] Skipping OM service check in dry run mode.
   [dry run] Taking back up of Raft Log file: /data/metadata/ratis/bf265839-605b-3f16-9796-c5ba1605619e/current/log_inprogress_0 to location: /tmp/log_inprogress_0
   [dry run] File backed-up successfully!
   [dry run] Created temporary output file: <None>
   [dry run] Processing Raft Log file: /data/metadata/ratis/bf265839-605b-3f16-9796-c5ba1605619e/current/log_inprogress_0 size:4194304
   [dry run] Replacing {cmdType: CreateVolume  traceID: ""  clientId: "client-E8BABFA039CC"  userInfo {    userName: "hadoop"    remoteAddress: "172.18.0.5"    hostName: "d7c72266fdaf"  }  version: 3  layoutVersion {    version: 8  }  createVolumeRequest {    volumeInfo {      adminName: "hadoop"      ownerName: "hadoop"      volume: "vol-0-26289"      quotaInBytes: 18446744073709551615      creationTime: 1762252520699      objectID: 0      updateID: 0      modificationTime: 1762252520699      quotaInNamespace: -1      usedNamespace: 0      refCount: 0    }  }  } with EchoRPC command at index 2
   [dry run] Finished processing all the entries (49 logs) from the segment file.
   [dry run] Moved temporary output file to correct raft log location : /data/metadata/ratis/bf265839-605b-3f16-9796-c5ba1605619e/current/log_inprogress_0
   
   bash-5.1$ ozone repair om skip-ratis-transaction -b /tmp --index 2 -s /data/metadata/ratis/bf265839-605b-3f16-9796-c5ba1605619e/current/log_inprogress_0          
   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: OM is currently running on this host with PID 7. Stop the service before running the repair tool.
   ```
   
   `RocksDBManualCompaction`
   ```
   bash-5.1$ ozone repair ldb compact --db /data/metadata/om.db --cf directoryTable
   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: Ensure the related service is stopped before compacting this database. Do you want to continue (y/N)? y
   Running compaction on directoryTable
   Compaction completed in 2ms.
   
   bash-5.1$ ozone repair ldb compact --db /data/metadata/om.db --cf directoryTable --dry-run
   [dry run] Running compaction on directoryTable
   [dry run] Compaction completed in 0ms.
   ```
   
   Before the fix dry-run mode was expecting the service to be offline.
   ```
   bash-5.1$ ozone repair om fso-tree --db /data/metadata/om.db --dry-run
   [dry run] Error: OM is currently running on this host with PID 7. Stop the service before running the repair tool.
   
   bash-5.1$ ozone repair om fso-tree --db /data/metadata/om.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: OM is currently running on this host with PID 7. Stop the service before running the repair tool.
   
   ```


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-13873. Block ozone repair if service is running and skip check in dry run mode [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #9249:
URL: https://github.com/apache/ozone/pull/9249#issuecomment-3501329111

   @dombizita would you like to take a look?


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-13873. Block ozone repair if service is running and skip check in dry run mode [ozone]

Posted by "dombizita (via GitHub)" <gi...@apache.org>.
dombizita commented on PR #9249:
URL: https://github.com/apache/ozone/pull/9249#issuecomment-3501419529

   Thanks for the patch @sarvekshayr, thank you for the review @adoroszlai! 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-13873. Block ozone repair if service is running and skip check in dry run mode [ozone]

Posted by "sarvekshayr (via GitHub)" <gi...@apache.org>.
sarvekshayr commented on PR #9249:
URL: https://github.com/apache/ozone/pull/9249#issuecomment-3489941228

   @adoroszlai @dombizita please review this tools-related PR.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-13873. Block ozone repair if service is running and skip check in dry run mode [ozone]

Posted by "dombizita (via GitHub)" <gi...@apache.org>.
dombizita merged PR #9249:
URL: https://github.com/apache/ozone/pull/9249


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org