-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Since Elasticsearch 6.1.0 environment variable substitutions in lists do not work #27926
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
Comments
On its face this looks like an X-Pack issue which we do not handle here as this is for open source Elasticsearch only. However, this is a core feature implemented in open source Elasticsearch. Have you set
show? Are you sure that you exported the environment variable? If you start the process (suspend it before it fails) and get its pid, does Are you sure that you did not mean
I am not sure what this mean. Bugs happen. So does user error. Let's figure it out together. |
I run ES in docker. I use my entrypoint script which exports ELASTICSEARCH_CONFIG_PATH variable before starting elasticsearch. I know the variable is exported (even see it in environ). To fix the issue I just need to build the docker image with older ES - 6.0.1 (not 6.1.0 or 6.1.1). The issue can be easily replicated by very simple installation of elasticsearch + x-pack without the docker. I do not know if this is elasticsearch or x-pack problem or their integration issue, but in pure elasticsearch var substition works (for example for path.data).
I wanted to say it looked like a feature for the first time - no one reported it, I expected a lot of people will be affected by this. |
Would you share a Dockerfile including entrypoint and reproduction of this issue please? |
Dockerfile:
Part of the entrypoint.sh (without comments, var, ... checking):
To reproduce the issue just try to use ${ELASTICSEARCH_CONFIG_PATH} in the arbitrary place under xpack: configuration. For example to set certificate_authorities. |
I want to help you but this is too far from a useable reproduction. For example, you are trying to switch to the |
I can reproduce, it seems to be exclusively a problem with array settings, so my guess is that it's a by-product of #26878 In 6.0.1 running with this config file:
would fail to start with:
In 6.1, it starts, but logs:
|
It seems to have been a somewhat consious decision in #26878 Assigning to @s1monw to comment. |
@jasontedor thank you. I will wait until this is fixed to upgrade. |
Since Elasticsearch 6.1.0 environment variable substitutions in lists do not work This commit fixes it. Closes elastic#27926
Since Elasticsearch 6.1.0 environment variable substitutions in lists do not work. Environment variables in a list setting were not resolved, because settings with a list type were skipped during variables resolution. This commit fixes by processing list settings as well. Closes #27926
Since Elasticsearch 6.1.0 environment variable substitutions in lists do not work. Environment variables in a list setting were not resolved, because settings with a list type were skipped during variables resolution. This commit fixes by processing list settings as well. Closes #27926
Since Elasticsearch 6.1.0 environment variable substitutions in lists do not work. Environment variables in a list setting were not resolved, because settings with a list type were skipped during variables resolution. This commit fixes by processing list settings as well. Closes #27926
In elasticsearch 6.1.0 and 6.1.1 I can not use variable substitutions for x-pack related configuration in elasticsearch. Also mentioned here: https://discuss.elastic.co/t/x-pack-6-1-0-does-not-handle-variable-substitutions/111953
xpack: security: authc: realms: ssl: certificate_authorities: [ "${ELASTICSEARCH_CONFIG_PATH}/certs/myca.crt" ]
I am receiving:
java.nio.file.NoSuchFileException: /app/volumes/config/${ELASTICSEARCH_CONFIG_PATH}/certs/myca.crt
Last known working version is 6.0.1. I am quite surprised this bug passed release testing cycle so I tried to find if this is a feature but it seems it is not.
The text was updated successfully, but these errors were encountered: