-
Notifications
You must be signed in to change notification settings - Fork 285
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
[Bug]: Snake case environment variables for settings do not work #20 #4451
Comments
Thanks for creating this issue. Also, https://github.com/opensearch-project/docker-images is on deprecation path, if you want to create OpenSearch docker images form source please follow https://github.com/opensearch-project/opensearch-build/blob/main/docker/release/README.md. |
@rishabh6788 No, not at least for us. This is in a throw away CI environment. There is no way to mount files in Bitbucket's pipeline runners https://support.atlassian.com/bitbucket-cloud/docs/databases-and-service-containers/ Our current workaround is using Elasticsearch. |
Hi @gowrizrh are you able to run docker with this command?
|
@peterzhuamazon Does the double quote approach work? If not, we could add snake case environment variables in core if that make things easier. |
Sorry for the drive-by comment without much knowledge of the particular context here. I'm only aware of this because a contributor to my project wants to add an OpenSearch container as a test case for our project. Anyway, this configuration property name vs environment variable problem looks familiar to me. MicroProfile (and therefore SmallRye, and therefore Quarkus) solve it like this: https://smallrye.io/smallrye-config/Main/config/environment-variables/ Just some food for thought or maybe inspiration on the name transformation approach. |
Describe the bug
We are migrating from Elasticsearch to Opensearch. We mostly use bitbucket pipelines to run functional or integration api testing where Elasticsearch is required as a service.
Currently, configuration of Opensearch via Docker variables is possible.
-e discovery.type=single-node
However, Bitbucket pipelines does not allow dots in variable definition for services.
See https://jira.atlassian.com/browse/BCLOUD-18007
See Elasticsearch's workaround elastic/elasticsearch#74036
For example
discovery.type
would becomeES_SETTING_DISCOVERY_TYPE
. This type of environment variable no longer works in Opensearch and it fails to boot up because of the bootstrap checks.To reproduce
Start a simple container passing in a snake cased variant of the configuration option.
docker run --rm -it -e "ES_SETTING_DISCOVERY_TYPE=single-node" opensearchproject/opensearch:latest
Results in the following logs
Expected behavior
A workaround or an alternative syntax to pass in variables without the dot format like Elasticsearch.
For example the docker environment variable
ES_SETTING_DISCOVERY_TYPE
is the same asdiscovery.type
Screenshots
No response
Host / Environment
Docker version 23.0.1, build a5ee5b1
Additional context
This is a copy of opensearch-project/docker-images#20
Relevant log output
No response
Acceptance Criteria
The text was updated successfully, but these errors were encountered: