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

Limit _FILE env var support to specific vars #52525

Merged

Conversation

pugnascotia
Copy link
Contributor

Closes #52503. Implement a list of _FILE env vars that will be used to
populate env vars with file content, instead of processing all _FILE
vars in the environment.

Closes elastic#52503. Implement a list of `_FILE` env vars that will be used to
populate env vars with file content, instead of processing all `_FILE`
vars in the environment.
@pugnascotia pugnascotia added :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts v8.0.0 v7.6.1 labels Feb 19, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Packaging)

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but why do we have ES_JAVA_OPTS file when you can already have jvm.options file, especially now that there is jvm.options.d?

@pugnascotia
Copy link
Contributor Author

This short and somewhat poor answer is, an existing test depended on it. I did consider whether we wanted to support ES_JAVA_OPTS_FILE, and it didn't seem unreasonable that someone might have a lengthy set of options that they wanted to keep in version control, and therefore pass as a file. However you're quite right, in that case jvm.options.d is a better choice, which I had forgotten about. I'll remove that option and the associated test (or rework it if I can).

Also add a test case for KEYSTORE_PASSWORD_FILE
@pugnascotia
Copy link
Contributor Author

@rjernst I removed ES_JAVA_OPTS_FILE and reworked the tests, including adding coverage for KEYSTORE_PASSWORD_FILE which was lacking. Can you take another look?

@pugnascotia pugnascotia requested a review from rjernst February 20, 2020 10:55
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pugnascotia
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-matrix-unix

@pugnascotia
Copy link
Contributor Author

@elasticmachine update branch

@pugnascotia pugnascotia merged commit ae68e4f into elastic:master Feb 21, 2020
@pugnascotia pugnascotia deleted the 52503-limit-file-env-var-support branch February 21, 2020 13:47
pugnascotia added a commit to pugnascotia/elasticsearch that referenced this pull request Feb 21, 2020
Backport of elastic#52525.

Closes elastic#52503. Implement a list of `_FILE` env vars that will be used to
populate env vars with file content, instead of processing all `_FILE`
vars in the environment.
pugnascotia added a commit to pugnascotia/elasticsearch that referenced this pull request Feb 21, 2020
Backport of elastic#52525.

Closes elastic#52503. Implement a list of `_FILE` env vars that will be used to
populate env vars with file content, instead of processing all `_FILE`
vars in the environment.
pugnascotia added a commit that referenced this pull request Feb 21, 2020
Backport of #52525.

Closes #52503. Implement a list of `_FILE` env vars that will be used to
populate env vars with file content, instead of processing all `_FILE`
vars in the environment.
pugnascotia added a commit that referenced this pull request Feb 21, 2020
Backport of #52525.

Closes #52503. Implement a list of `_FILE` env vars that will be used to
populate env vars with file content, instead of processing all `_FILE`
vars in the environment.
@ywelsch ywelsch added the >bug label Feb 27, 2020
@ywelsch
Copy link
Contributor

ywelsch commented Feb 27, 2020

Please use a top-level label (e.g., bug, enhancement, feature, etc.) for each PR, as this is used for generating the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team v7.6.1 v7.7.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elasticsearch 7.6.0 cannot be used as service in GitLab pipeline anymore
6 participants