From 43fa1e0719a285110a7e032f71f3bb7e7f154700 Mon Sep 17 00:00:00 2001 From: Circadian Date: Tue, 18 Aug 2026 07:00:26 +0200 Subject: [PATCH] fix(compose): gate Data Prepper readiness on the OTLP source port Docker Compose reports Data Prepper ready while its OpenSearch sinks are still uninitialised, because the service has no health check and the official image does not provide one. `docker compose up --wait` therefore exits 0 while port 21890 is still refusing connections. Adds a health check that probes the OTLP gRPC source rather than the Core API. The Core API on 4900 answers while a sink is still retrying, so it cannot gate readiness; 21890 is the port that stays closed. The probe uses bash's /dev/tcp, which needs no tooling that is not already present: this service's own command runs /bin/bash. Fixes: #409 Signed-off-by: Circadian --- docker-compose.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 0f7be59c..ab3a90e2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -103,6 +103,18 @@ services: opensearch: condition: service_healthy required: false + healthcheck: + # The Core API on 4900 answers while an OpenSearch sink is still retrying + # initialisation, so it cannot gate readiness. Probe the OTLP gRPC source + # instead: 21890 is the port that stays closed when a sink fails, which is + # exactly the state reported in #409. + # bash is available in this image - this service's own command already + # runs /bin/bash - so no extra tooling is needed for the probe. + test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/21890"] + start_period: 30s + interval: 5s + timeout: 5s + retries: 20 networks: - observability-stack-network restart: unless-stopped