Skip to content

Commit

Permalink
Cherry-pick to 7.x: [ITs] change healthcheck for elasticsearch (#20514)(
Browse files Browse the repository at this point in the history
#20558) (#20538)

* [ITs] change healthcheck for elasticsearch (#20514)
* [ITs] Revert healthcheck for elasticsearchssl service to the previous behaviour (#20558)
  • Loading branch information
v1v authored Aug 12, 2020
1 parent 21fee14 commit c3257ce
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions libbeat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ services:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: elasticsearch
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]

test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"]
elasticsearchssl:
extends:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
Expand Down
2 changes: 1 addition & 1 deletion testing/environments/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 300
interval: 1s
environment:
Expand Down
2 changes: 1 addition & 1 deletion testing/environments/snapshot-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.0-SNAPSHOT
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 300
interval: 1s
environment:
Expand Down
2 changes: 1 addition & 1 deletion testing/environments/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0-SNAPSHOT
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 300
interval: 1s
environment:
Expand Down
2 changes: 1 addition & 1 deletion x-pack/libbeat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: elasticsearch
healthcheck:
test: ["CMD-SHELL", "curl http://myelastic:changeme@localhost:9200/_cat/health?h=status | grep -q green"]
test: ["CMD-SHELL", "curl -u myelastic:changeme -f http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 1200
interval: 5s
start_period: 60s
Expand Down

0 comments on commit c3257ce

Please sign in to comment.