Skip to content

RANGER-5227: Add healthchecks for all containers - #604

Open
kumaab wants to merge 1 commit into
apache:masterfrom
kumaab:ranger_5227
Open

kumaab wants to merge 1 commit into
apache:masterfrom
kumaab:ranger_5227

Conversation

@kumaab

@kumaab kumaab commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Moving #600 here.

  • Add health checks in docker-compose.yaml for all supported docker services.
  • Add curl to the ranger-base image to aid in generic health checks across containers.
  • Update env variables to allow creation of topic in Kafka container.
  • Explicitly allow ruok command in whitelist for Zookeeper container.

How was this patch tested?

Tested changes locally for all containers, docker ps reports all containers as healthy.

Every service in dev-support/ranger-docker now declares a docker healthcheck, so
`docker compose up -d --wait` blocks until the stack is actually serving. CI used
to sleep for a fixed 60s and then only look at .State.Running, which passed while
a container was still initialising and failed on slower runners.

Each probe gates on readiness of the service, not just on a bound port:

  ranger              /service/actuator/health reports UP (unauthenticated)
  ranger-zk           4lw ruok, whitelisted via ZOO_4LW_COMMANDS_WHITELIST
  ranger-solr         ranger_audits core is routed (SPNEGO, so 401 counts)
  ranger-opensearch   cluster health green or yellow
  ranger-hbase        master is active and the regionserver status page serves
  ranger-hive         metastore (9083) and HiveServer2 (10000) are bound
  ranger-kms          kms webapp is deployed and answering
  ranger-knox         sandbox topology deployed, demo LDAP authenticating and
                      the Ranger Knox authorizer answering
  ranger-usersync     /api/metrics/status
  ranger-tagsync      tag source and sink initialised
  ranger-trino        /v1/info reports starting=false
  ozone-om            ratis role is LEADER_AND_READY
  ozone-scm           out of safe mode
  ozone-datanode      datanode HTTP server is up

ci.yml: both docker jobs use `up -d --wait` in place of the fixed sleeps and the
bespoke ranger-kdc wait loop, the container check reports health alongside state,
and a failure step groups `docker logs` for every container.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant