Skip to content

Disable default disk threshold check in ElasticsearchContainer#7245

Merged
eddumelendez merged 1 commit intotestcontainers:mainfrom
lhotari:lh-disable-elastic-disk-threshold-check
Jun 28, 2023
Merged

Disable default disk threshold check in ElasticsearchContainer#7245
eddumelendez merged 1 commit intotestcontainers:mainfrom
lhotari:lh-disable-elastic-disk-threshold-check

Conversation

@lhotari
Copy link
Contributor

@lhotari lhotari commented Jun 28, 2023

Motivation

Elasticsearch stops writing to disk when the usage goes above 90%.
This problem can be hard to detect in CI environments.

Only after adding .withLogConsumer(o -> log.info("elastic> {}", o.getUtf8String())) did I find out that Elastic had logged this kind of warning:
high disk watermark [90%] exceeded on [WSN4y7xITamrUzTvic-eEg][94f6a74e1f83][/usr/share/elasticsearch/data] free: 8.1gb[9.7%], shards will be relocated away from this node; currently relocating away shards totalling [0] bytes; the node is expected to continue to exceed the high disk watermark when these relocations are complete

Modifications

Set cluster.routing.allocation.disk.threshold_enabled to false to disable the disk threshold check.

@lhotari lhotari requested a review from a team June 28, 2023 17:16
@eddumelendez eddumelendez added this to the next milestone Jun 28, 2023
@eddumelendez eddumelendez merged commit 69555ee into testcontainers:main Jun 28, 2023
@eddumelendez
Copy link
Member

Thanks for your contribution, @lhotari !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants