HDDS-10898. Validate OZONE_CONF_DIR by presence of ozone-site.xml, not log4.properties #6713
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Ozone's services startup scripts (e.g. ozone-functions.sh) require the log4j.properties config file to be in $OZONE_CONF_DIR. If the config file isn't there the OZONE_CONF_DIR env variable will be overridden as $OZONE_HOME/etc/hadoop (but all of the required and properly filled configuration files are in the previous location).
The PR suggests changing the requirement from log4j.properties to ozone-site.xml configuration file (at least SCM can't start without some mandatory conf properties inside, but all of the ozone's services can work without logger config (we won't see any log message, but the service will work anyway)
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10898
How was this patch tested?
manually (mvn build and docker-compose up, + number of commands to deal with ozone cluster: create bucket, put key, get key), a green build is here - https://github.com/vtutrinov/ozone/actions/runs/9188563850