Implement /health admin API endpoint to check node health #440

Merged
lx merged 5 commits from admin-health-api into main 2022-12-11 17:25:29 +00:00
Owner

Endpoint returns 200 OK if there is a quorum for all storage partitions, or 503 Service unavailable if quorum is not attained for some partitions.

Endpoint is available as two variants:

  • /health: non-authenticated, minimal for use with e.g. automated Consul health checks, returns a status code and a small text message that describes the situation
  • /v0/health: full JSON API, returns a JSON object with some interesting numeric values on number of available nodes, partitions with quorum, etc.

TODO: update specification of the JSON API

Fix #418

Endpoint returns 200 OK if there is a quorum for all storage partitions, or 503 Service unavailable if quorum is not attained for some partitions. Endpoint is available as two variants: - `/health`: non-authenticated, minimal for use with e.g. automated Consul health checks, returns a status code and a small text message that describes the situation - `/v0/health`: full JSON API, returns a JSON object with some interesting numeric values on number of available nodes, partitions with quorum, etc. TODO: update specification of the JSON API Fix #418
lx added 1 commit 2022-12-05 14:05:23 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2065f011ca
Implement /health admin API endpoint to check node health
lx added 1 commit 2022-12-05 14:29:16 +00:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
280d1be7b1
Refactor health check and add ability to return it in json
lx added 1 commit 2022-12-05 14:38:52 +00:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
d7868c48a4
Separate /health (simple text answer) and /v0/health (full json answer, authenticated)
lx changed title from WIP: Implement /health admin API endpoint to check node health to Implement /health admin API endpoint to check node health 2022-12-05 16:22:51 +00:00
lx changed title from Implement /health admin API endpoint to check node health to WIP: Implement /health admin API endpoint to check node health 2022-12-05 16:23:01 +00:00
lx added 1 commit 2022-12-11 17:11:45 +00:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
5ea5fd2130
Always return 200 OK on /v0/health, reinstate admin api doc as draft and complete it
lx added 1 commit 2022-12-11 17:17:17 +00:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
533afcf4e1
simplify
Author
Owner

I have not completed doc/api/garage-admin-v0.yml but I wrote a small section explaining the new endpoints in the markdown file for the admin API. That'll have to do for now.

I have not completed `doc/api/garage-admin-v0.yml` but I wrote a small section explaining the new endpoints in the markdown file for the admin API. That'll have to do for now.
lx changed title from WIP: Implement /health admin API endpoint to check node health to Implement /health admin API endpoint to check node health 2022-12-11 17:20:13 +00:00
lx merged commit defd7d9e63 into main 2022-12-11 17:25:29 +00:00
Sign in to join this conversation.
No description provided.