Skip to content

Commit 3a4e74a

Browse files
committed
Fix CI: Update OpenSearch health check in all workflows
- Use simpler health check (curl root endpoint instead of _cluster/health) - Increase timeout from 5s to 10s - Increase retries from 5 to 20 - Increase interval from 10s to 15s - Gives OpenSearch up to ~310 seconds to become healthy The _cluster/health endpoint may return non-200 status during startup even when OpenSearch is responding. Using root endpoint is more reliable.
1 parent d5c6abd commit 3a4e74a

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

.github/workflows/build_container_image.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ jobs:
182182
discovery.type: single-node
183183
plugins.security.ssl.http.enabled: false
184184
options: >-
185-
--health-cmd "curl -f http://localhost:9200/_cluster/health"
186-
--health-interval 10s
187-
--health-timeout 5s
188-
--health-retries 5
185+
--health-cmd "curl -s http://localhost:9200 >/dev/null || exit 1"
186+
--health-interval 15s
187+
--health-timeout 10s
188+
--health-retries 20
189189
ports:
190190
- 9200:9200
191191

.github/workflows/lint_and_unit.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ jobs:
6868
plugins.security.disabled: true
6969
OPENSEARCH_INITIAL_ADMIN_PASSWORD: admin
7070
options: >-
71-
--health-cmd "curl -f http://localhost:9200/_cluster/health || exit 1"
72-
--health-interval 10s
71+
--health-cmd "curl -s http://localhost:9200 >/dev/null || exit 1"
72+
--health-interval 15s
7373
--health-timeout 10s
74-
--health-retries 10
74+
--health-retries 20
7575
ports:
7676
- 9200:9200
7777

.github/workflows/test_pull_request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ jobs:
4343
plugins.security.disabled: true
4444
OPENSEARCH_INITIAL_ADMIN_PASSWORD: admin
4545
options: >-
46-
--health-cmd "curl -f http://localhost:9200/_cluster/health"
47-
--health-interval 10s
48-
--health-timeout 5s
49-
--health-retries 5
46+
--health-cmd "curl -s http://localhost:9200 >/dev/null || exit 1"
47+
--health-interval 15s
48+
--health-timeout 10s
49+
--health-retries 20
5050
ports:
5151
- 9200:9200
5252

0 commit comments

Comments
 (0)