Which chart:
Elasticsearch (version 15.4.0)
Describe the bug
config parameter allows to provide some custom configuration. But it is directly mounted on /opt/bitnami/elasticsearch/config/elastisearch.yaml through a configMap and then entrypoint scripts are not able to modify it to create a valid configuration.
Looking at images scripts /opt/bitnami/scripts/libelasticsearch.sh, there is a fonction elasticsearch_custom_configuration() usable for injecting custom config in elastisearch.yaml. this function looks into ${ELASTICSEARCH_CONF_DIR}/my_elasticsearch.yml. I think the configMap should be mounted on this path instead.
To Reproduce
- Configure values.yml with something like:
config:
node:
store:
allow_mmap: false
- Deploy => Elasticsearch pods fail to start
�[38;5;6melasticsearch �[38;5;5m17:25:52.23 �[0m
�[38;5;6melasticsearch �[38;5;5m17:25:52.23 �[0m�[1mWelcome to the Bitnami elasticsearch container�[0m
�[38;5;6melasticsearch �[38;5;5m17:25:52.24 �[0mSubscribe to project updates by watching �[1mhttps://github.com/bitnami/bitnami-docker-elasticsearch�[0m
�[38;5;6melasticsearch �[38;5;5m17:25:52.24 �[0mSubmit issues and feature requests at �[1mhttps://github.com/bitnami/bitnami-docker-elasticsearch/issues�[0m
�[38;5;6melasticsearch �[38;5;5m17:25:52.24 �[0m
�[38;5;6melasticsearch �[38;5;5m17:25:52.25 �[0m�[38;5;2mINFO �[0m ==> ** Starting Elasticsearch setup **
�[38;5;6melasticsearch �[38;5;5m17:25:52.29 �[0m�[38;5;2mINFO �[0m ==> Configuring/Initializing Elasticsearch...
�[38;5;6melasticsearch �[38;5;5m17:25:52.34 �[0m�[38;5;2mINFO �[0m ==> Custom configuration file detected, using it...
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
�[38;5;6melasticsearch �[38;5;5m17:25:56.97 �[0m�[38;5;2mINFO �[0m ==> ** Elasticsearch setup finished! **
�[38;5;6melasticsearch �[38;5;5m17:25:56.98 �[0m�[38;5;2mINFO �[0m ==> ** Starting Elasticsearch **
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2021-06-17T17:26:01,846][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [elastic-elasticsearch-data-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.data' (/opt/bitnami/elasticsearch/data)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.13.2.jar:7.13.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.13.2.jar:7.13.2]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.13.2.jar:7.13.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.13.2.jar:7.13.2]
at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.13.2.jar:7.13.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.13.2.jar:7.13.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.13.2.jar:7.13.2]
Caused by: java.lang.IllegalStateException: Unable to access 'path.data' (/opt/bitnami/elasticsearch/data)
at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:61) ~[elasticsearch-7.13.2.jar:7.13.2]
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:207) ~[elasticsearch-7.13.2.jar:7.13.2]
[...]
Expected behavior
Cluster should start with a valid configuration ;)
Version of Helm and Kubernetes:
version.BuildInfo{Version:"v3.5.3", GitCommit:"041ce5a2c17a58be0fcd5f5e16fb3e7e95fea622", GitTreeState:"dirty", GoVersion:"go1.15.8"}
- Output of
kubectl version:
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:41:02Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.0+d856161", GitCommit:"d8561614ec39e7dc33ef531690b919178010226c", GitTreeState:"clean", BuildDate:"2021-04-23T13:59:46Z", GoVersion:"go1.15.7", Compiler:"gc", Platform:"linux/amd64"}
Which chart:
Elasticsearch (version 15.4.0)
Describe the bug
configparameter allows to provide some custom configuration. But it is directly mounted on/opt/bitnami/elasticsearch/config/elastisearch.yamlthrough a configMap and then entrypoint scripts are not able to modify it to create a valid configuration.Looking at images scripts
/opt/bitnami/scripts/libelasticsearch.sh, there is a fonctionelasticsearch_custom_configuration()usable for injecting custom config inelastisearch.yaml. this function looks into${ELASTICSEARCH_CONF_DIR}/my_elasticsearch.yml. I think the configMap should be mounted on this path instead.To Reproduce
Expected behavior
Cluster should start with a valid configuration ;)
Version of Helm and Kubernetes:
helm version:kubectl version: