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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently this sources this file. This has other environment variables which won't be set if there is an environment variable
OPENSEARCH_PATH_CONF
in the current shell.This might create problems without the user realizing why.
I think this needs be properly communicated in documentation and by logging a warning message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree there needs a properly notice to the users to aware the other environment variable in
${source.path.env}
, because there is one:OpenSearch/distribution/packages/src/common/env/opensearch
Line 31 in 34550c5
But during my test, I found the variables in above file can still be set through systemd service file:
OpenSearch/distribution/packages/src/common/systemd/opensearch.service
Line 15 in 34550c5
OPENSEARCH_PATH_CONF
, and start several OpenSearch processes in the same host.So in my opinion, the users understand what they are doing because they still need to do the above additional step, and common users will not be affected by the change in the PR.
While, if the user starts multiple OpenSearch processes without using the systemd service (though I don't know if there is a way to skip the systemd sevice), the value of
OPENSEARCH_STARTUP_SLEEP_TIME
is not set and the user may not realize.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's (
OPENSEARCH_STARTUP_SLEEP_TIME=5
) the only uncommented one but there are other variables that might have been modified. The service can be started withoutsystemd
. We can assume that the users know what they are doing but if we're changing existing behaviour it should be properly communicated.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Rabi 😄 I see, you are right.
With the change in the PR, when user set custom
OPENSEARCH_PATH_CONF
, and started OpenSearch process without systemd (such as running theopensearch
bash script directly) the default values in${source.path.env}
will not be loaded, so it needs a notice.