fix(openaev): align healthcheck on application-level /api/health endpoint#40
Open
RomuDeuxfois wants to merge 1 commit into
Open
fix(openaev): align healthcheck on application-level /api/health endpoint#40RomuDeuxfois wants to merge 1 commit into
RomuDeuxfois wants to merge 1 commit into
Conversation
…oint
Replaces the generic Spring Boot Actuator liveness ping
(`/actuator/health/ping`) with OpenAEV's own application health
endpoint (`/api/health?health_access_key=`), consistent with:
- OpenAEV-Platform/docker's docker-compose.yml
- The pattern already used for OpenCTI in this same file
(`/health?health_access_key=${OPENCTI_HEALTHCHECK_ACCESS_KEY}`)
The actuator ping only proves the JVM process is alive; it does not
check that OpenAEV's dependencies (DB, MinIO, RabbitMQ, ES) are
actually reachable, which is what `depends_on: condition: service_healthy`
consumers (xtm-composer, collectors, injectors) actually need.
`OPENAEV_HEALTHCHECK_KEY` is already defined and injected into the
`openaev` service environment, so no new secret is introduced.
`retries` aligned to 20 to match OpenAEV-Platform/docker;
`start_period: 120s` kept since this is now a real app-level
readiness check (DB/ES/MinIO init) rather than a JVM liveness ping,
which needs more warm-up time than actuator did.
There was a problem hiding this comment.
Pull request overview
Updates the openaev service healthcheck in docker-compose.yml to use OpenAEV’s application-level readiness endpoint (/api/health) instead of the Spring Actuator liveness ping, ensuring dependent services only start once OpenAEV is actually ready.
Changes:
- Switched
openaevhealthcheck from/actuator/health/pingto/api/health?health_access_key=.... - Reduced
healthcheck.retriesfrom 30 to 20 (keptstart_period: 120s).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| restart: always | ||
| healthcheck: | ||
| test: [ "CMD", "wget", "-qO-", "http://openaev:8080/actuator/health/ping" ] | ||
| test: [ "CMD", "wget", "-qO-", "http://openaev:8080/api/health?health_access_key=${OPENAEV_HEALTHCHECK_KEY}" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Aligns the
openaevservice healthcheck indocker-compose.ymlwith the pattern already used foropenctiin the same file, and withOpenAEV-Platform/docker's own compose file.Why
/actuator/health/pingis a generic Spring Boot Actuator liveness probe — it only proves the JVM process responds, with no visibility into whether OpenAEV's actual dependencies (Postgres, MinIO, RabbitMQ, Elasticsearch) are reachable./api/health?health_access_key=is OpenAEV's application-level health endpoint — a real readiness check, same mechanism OpenCTI already uses in this same file (/health?health_access_key=${OPENCTI_HEALTHCHECK_ACCESS_KEY}) and the one used inOpenAEV-Platform/docker.openaev: condition: service_healthy(xtm-composer, allcollector-*andinjector-*services). A liveness-only check means those consumers can start against an OpenAEV instance that's "up" but not actually ready to serve traffic (e.g. DB migration still running).OPENAEV_HEALTHCHECK_KEYis already defined and injected in theopenaevservice environment (OPENAEV_HEALTHCHECK_KEY=${OPENAEV_HEALTHCHECK_KEY:-ChangeMe}), so no new secret/env var is introduced.Notes
retrieslowered from 30 → 20 to matchOpenAEV-Platform/docker.start_period: 120skept: this is now a real app-level readiness check (DB/ES/MinIO init), which can reasonably take longer to go green than a bare actuator ping — happy to drop it if we'd rather matchOpenAEV-Platform/dockerexactly (nostart_periodthere).Scope / impact
docker-compose.yml), no application code touched.xtm-composer/ collectors / injectors that wait onopenaev: service_healthy— expected and desired.Related discussion: Teams thread on healthcheck inconsistency between
dockerandxtm-dockerrepos.