chihsuan opened a new pull request, #10352: URL: https://github.com/apache/ozone/pull/10352
## What changes were proposed in this pull request? The environment variables used to configure and run Ozone are inconsistent between the shell scripts (`ozone`, `ozone-functions.sh`) and the file that documents them, `ozone-env.sh`. This leaves several useful variables undocumented, documents one variable under a name the scripts never read, and keeps dead examples around, all of which confuses operators. This PR aligns the documentation with the actual behavior of the scripts and makes the HttpFS gateway consistent with the other daemons. The change is split into one commit per fix: 1. **Add `OZONE_HTTPFS_OPTS` support for the httpfs subcommand.** Previously the `httpfs)` case in the `ozone` launcher hard-coded its JVM properties directly into `OZONE_OPTS`, the only daemon to do so. It now seeds a dedicated `OZONE_HTTPFS_OPTS` variable, exactly mirroring the `recon)` and `s3g)` cases. The generic `ozone_subcommand_opts` handler then folds it into `OZONE_OPTS`, so a user-supplied `OZONE_HTTPFS_OPTS` is honored. 2. **Document the missing component `_OPTS` variables** in `ozone-env.sh`: `OZONE_S3G_OPTS`, `OZONE_RECON_OPTS`, `OZONE_HTTPFS_OPTS`, `OZONE_CSI_OPTS`, and the client/tool ones (`OZONE_SH_OPTS`, `OZONE_FS_OPTS`, `OZONE_ADMIN_OPTS`, `OZONE_DEBUG_OPTS`, `OZONE_FREON_OPTS`, `OZONE_VAPOR_OPTS`). 3. **Document other supported-but-undocumented variables**: `OZONE_SERVER_OPTS`, `OZONE_WORKER_NAMES`, `OZONE_DAEMON_JSVC_EXTRA_OPTS`, `OZONE_LOGLEVEL`. 4. **Correct the secure-log variable name** from `OZONE_SECURE_LOG` to `OZONE_SECURE_LOG_DIR`, which is what `ozone-functions.sh` actually reads. Setting the documented name previously had no effect. 5. **Remove dead examples** `OZONE_GC_SETTINGS` and `OZONE_SECURE_IDENT_PRESERVE`, which are no longer read anywhere in the scripts. Only comments/documentation change except for fix 1, which is a one-line consistency refactor of the `httpfs)` case. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-14443 ## How was this patch tested? Manual testing against a locally built distribution: * `bash -n` syntax check on the edited `ozone` script and `ozone-env.sh`. * Verified the real `ozone_subcommand_opts` handler folds `OZONE_HTTPFS_OPTS` into `OZONE_OPTS`. * End-to-end: ran the edited launcher with a stub `java` that echoes its arguments; confirmed a user-set `OZONE_HTTPFS_OPTS="-Dfoo=bar"` reaches the final command while the built-in `-Dhttpfs.home.dir` / `-Dhttpfs.config.dir` properties are still present. Confirmed `ozone recon` (`OZONE_RECON_OPTS`) handles its options identically, demonstrating the intended consistency. No new unit test was added: the changed `httpfs)` branch lives in `ozonecmd_case` in the launcher, which has no bats harness, and the sibling cases it mirrors (`recon)`, `s3g)`, `om)`) are likewise untested at that level; the append itself goes through the already-exercised `ozone_subcommand_opts`. HttpFS is covered by the `compose/httpfs` acceptance suite. -- 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]
