adoroszlai opened a new pull request, #8918: URL: https://github.com/apache/ozone/pull/8918
## What changes were proposed in this pull request? 1. Create reusable classes for adding `--service-id` and `--service-host` options for OM. 2. Apply the new mixins to `ozone admin om` commands 3. Let `ozone admin om` accept `--om-service-id`, too, just like other commands. 4. Deprecate `-id` and `-host` by hiding them, but continue accepting them. 5. Downgrade picocli to 4.7.5 due to a bug that breaks `ArgGroup` usage. 6. Close OM clients where it was missing https://issues.apache.org/jira/browse/HDDS-13406 ## How was this patch tested? Existing tests: https://github.com/adoroszlai/ozone/actions/runs/16834543305 Checked presence of `--om-service-id` and absence of `-id` in help of each command. Some examples: ```bash $ ozone admin om prepare --help Usage: ozone admin om prepare [-hV] [--verbose] (--service-id=<serviceID>) Prepares Ozone Manager for upgrade/downgrade, by applying all pending transactions, taking a Ratis snapshot at the last transaction and purging all logs on each OM instance. The returned transaction #ID corresponds to the last transaction in the quorum in which the snapshot is taken. -h, --help Show this help message and exit. --service-id, --om-service-id=<serviceID> Ozone Manager Service ID. -V, --version Print version information and exit. --verbose More verbose output. Show the stack trace of the errors. $ ozone admin om decommission --help Usage: ozone admin om decommission --service-id=<om-service-id> -nodeid=<decommission-om-node-id> -hostname=<decommission-om-node-address> [options] Decommission an OzoneManager. Ensure that the node being decommissioned is shutdown first. Note - Add the node to be decommissioned to ozone.om.decommissioned.nodesconfig in ozone-site.xml of all OzoneManagers before proceeding with decommission. Note - DECOMMISSIONING AN OM MIGHT RENDER THE CLUSTER TO LOSE HIGH AVAILABILITY. Note - When there are only two OzoneManagers, do not stop the OzoneManager before decommissioning as both OzoneManagers are required to reach quorum. It is recommended to add another OzoneManager(s) before decommissioning one to maintain HA. --force This option will skip checking whether OM configs have been updated with the decommissioned node added to ozone.om. decommissioned.nodes config in ozone-site.xml. -h, --help Show this help message and exit. -hostname, --node-host-address=<hostname> Host name/address of the OM to be decommissioned. -nodeid, --nodeid=<decommNodeId> NodeID of the OM to be decommissioned. --service-id, --om-service-id=<serviceID> Ozone Manager Service ID. -V, --version Print version information and exit. --verbose More verbose output. Show the stack trace of the errors. ``` Also presence of both `--service-id` and `--service-host`: ``` $ ozone admin om updateranger --help Usage: ozone admin om updateranger [-hV] [--no-wait] [--verbose] [--service-id=<serviceID> | --service-host=<host>] Trigger Ranger sync background service task on a leader OM that pushes policies and roles updates to Ranger. This operation requires Ozone administrator privilege. -h, --help Show this help message and exit. --no-wait Do not wait for task completion. Exit immediately after the Ranger BG sync task is triggered on the OM. --service-host=<host> Ozone Manager Host. --service-id, --om-service-id=<serviceID> Ozone Manager Service ID. -V, --version Print version information and exit. --verbose More verbose output. Show the stack trace of the errors. ``` -- 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]
