diff --git a/CHANGELOG.md b/CHANGELOG.md index 0256ebf0cd..9905856c53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ the release. ([#1707](https://github.com/open-telemetry/opentelemetry-demo/pull/1707)) * [chore] Fix gen-proto for accountingservice ([#1709](https://github.com/open-telemetry/opentelemetry-demo/pull/1709)) +* [chore] Add depends on to otelcol to wait on healthy opensearch + ([#1724](https://github.com/open-telemetry/opentelemetry-demo/pull/1724)) * [accountingservice] bump OpenTelemetry .NET Automatic Instrumentation to 1.8.0 together with other dependencies ([#1727](https://github.com/open-telemetry/opentelemetry-demo/pull/1727)) diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml index d20c1f0bc4..585bed01f9 100644 --- a/docker-compose.minimal.yml +++ b/docker-compose.minimal.yml @@ -593,7 +593,10 @@ services: - "${OTEL_COLLECTOR_PORT_GRPC}" - "${OTEL_COLLECTOR_PORT_HTTP}" depends_on: - - jaeger + jaeger: + condition: service_started + opensearch: + condition: service_healthy logging: *logging environment: - ENVOY_PORT @@ -654,4 +657,10 @@ services: hard: 65536 ports: - "9200" + healthcheck: + test: curl -s http://localhost:9200/_cluster/health | grep status | grep -q '\\(green\\|yellow\\)' + start_period: 10s + interval: 5s + timeout: 10s + retries: 10 logging: *logging diff --git a/docker-compose.yml b/docker-compose.yml index b140a5b052..014c2b41d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -704,7 +704,10 @@ services: - "${OTEL_COLLECTOR_PORT_GRPC}" - "${OTEL_COLLECTOR_PORT_HTTP}" depends_on: - - jaeger + jaeger: + condition: service_started + opensearch: + condition: service_healthy logging: *logging environment: - ENVOY_PORT @@ -765,4 +768,10 @@ services: hard: 65536 ports: - "9200" + healthcheck: + test: curl -s http://localhost:9200/_cluster/health | grep -q '"status":"green"' + start_period: 10s + interval: 5s + timeout: 10s + retries: 10 logging: *logging