Disable default geoip database downloading for Elasticsearch container #7247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
By default, Elasticsearch container will download the geoip lite database.
It's better to disable this behavior by default.
There's also an elastic issue about this default behavior: elastic/elasticsearch#90673. Fixed since v8.7.0 with elastic/elasticsearch#92335 .
Modifications
geoip downloading can be disabled by passing
-Dingest.geoip.downloader.enabled.default=false
in JVM options or passingingest.geoip.downloader.enabled=false
in the environment.The problem with passing
ingest.geoip.downloader.enabled=false
in the environment is that it's not compatible with OpenSearch. OpenSearch will fail to start with a configuration validation errororg.opensearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [ingest.geoip.downloader.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
. Some users might be using ElasticsearchContainer class together with the OpenSearch docker image.