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
Implement /health admin API endpoint to check node health
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2065f011ca
lx added 1 commit 2022-12-05 14:29:16 +00:00
Refactor health check and add ability to return it in json
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
280d1be7b1
lx added 1 commit 2022-12-05 14:38:52 +00:00
Separate /health (simple text answer) and /v0/health (full json answer, authenticated)
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
d7868c48a4
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
Always return 200 OK on /v0/health, reinstate admin api doc as draft and complete it
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
5ea5fd2130
lx added 1 commit 2022-12-11 17:17:17 +00:00
simplify
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
533afcf4e1
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 reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#440
No description provided.