ci: Disable Elasticsearch disk allocation decider
This commit is contained in:
parent
38a4684c49
commit
3b61a6bb17
|
@ -68,6 +68,11 @@ jobs:
|
|||
docker compose up setup
|
||||
docker compose up -d
|
||||
|
||||
# Elasticsearch's high disk watermark gets regularly exceeded on GitHub Actions runners.
|
||||
# https://www.elastic.co/guide/en/elasticsearch/reference/8.10/fix-watermark-errors.html
|
||||
- name: Disable Elasticsearch disk allocation decider
|
||||
run: .github/workflows/scripts/disable-disk-alloc-decider.sh
|
||||
|
||||
- name: Execute core test suite
|
||||
run: .github/workflows/scripts/run-tests-core.sh
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
|
||||
source "${BASH_SOURCE[0]%/*}"/lib/testing.sh
|
||||
|
||||
|
||||
cid_es="$(container_id elasticsearch)"
|
||||
ip_es="$(service_ip elasticsearch)"
|
||||
|
||||
grouplog 'Wait for readiness of Elasticsearch'
|
||||
poll_ready "$cid_es" "http://${ip_es}:9200/" -u 'elastic:testpasswd'
|
||||
endgroup
|
||||
|
||||
log 'Disabling disk allocation decider'
|
||||
|
||||
declare -a put_args=( '-X' 'PUT' '--fail-with-body' '-s' '-u' 'elastic:testpasswd'
|
||||
'-H' 'Content-Type: application/json'
|
||||
"http://${ip_es}:9200/_cluster/settings?pretty"
|
||||
'-d' '{"persistent":{"cluster.routing.allocation.disk.threshold_enabled":false}}'
|
||||
)
|
||||
declare response
|
||||
declare -i exit_code=0
|
||||
|
||||
response=$(curl "${put_args[@]}") || exit_code=$?
|
||||
echo "$response"
|
||||
|
||||
exit $exit_code
|
Loading…
Reference in New Issue