Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #3116 - [BUG] DEB is using RPM default file path #3163

Merged
merged 1 commit into from
Feb 3, 2023
Merged

Fix #3116 - [BUG] DEB is using RPM default file path #3163

merged 1 commit into from
Feb 3, 2023

Conversation

etgraylog
Copy link
Contributor

@etgraylog etgraylog commented Jan 31, 2023

Description

In this PR is a code-change to fix #3116 - add the Debian location of default env vars to the opensearch.service template.

The fix is to take advantage of the dash (-) prefix of SystemD's EnvironmentFile= option. We can add multiple options, as if the file does not exist, it will not be read and no error or warning message is logged per SystemD documentation:

"The argument passed should be an absolute filename or wildcard expression, optionally prefixed with "-", which indicates that if the file does not exist, it will not be read and no error or warning message is logged. This option may be specified more than once in which case all specified files are read. If the empty string is assigned to this option, the list of file to read is reset, all prior assignments have no effect."

This approach is also used currently for the opensearch-dashboards.service as well.

Issues Resolved

#3116

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@etgraylog etgraylog requested a review from a team as a code owner January 31, 2023 22:19
Signed-off-by: Evan Tepsic <evan.tepsic@graylog.com>
@peterzhuamazon
Copy link
Member

Thanks @etgraylog for the fix here will take a look.

cc: @bbarani

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Feb 3, 2023

Hi @etgraylog,

We will accept this fix but it wont take effect until the file is being permanently moved to /etc/default/ on debian.
We think moving the file location would be a broken change if user starts to make tweaks on defaults and expect the file to be in /etc/sysconfig/.

We will make the permanently file path change in 3.x.

Thanks.

cc: @bbarani

@peterzhuamazon peterzhuamazon merged commit d551818 into opensearch-project:main Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deb rpm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] DEB is using RPM default file path (/etc/sysconfig vs /etc/default)
2 participants