Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(status): CP /status/ready return 503 when DB is off #10787

Merged
merged 2 commits into from
May 5, 2023

Conversation

locao
Copy link
Contributor

@locao locao commented May 4, 2023

Summary

This PR changes the behavior of the new readiness endpoint for control plane nodes.

The new endpoint /status/ready added in #10610 checks if Kong Gateway is ready for proxying. This check only makes sense in data plane nodes, as control plane nodes don't proxy traffic. But the response could be misleading, control plane nodes failing to connect to the database would return 200 OK, even if they are not functional.

Note: this PR has no automated tests, our test suite does not support stopping the database while the tests are running.

Checklist

Full changelog

  • Check for database connection in control plane nodes.

Issue reference

KAG-1437

@locao locao force-pushed the fix/cp-readiness-status branch 2 times, most recently from 147fb7e to 5bf391a Compare May 5, 2023 14:14
@pull-request-size pull-request-size bot added size/S and removed size/M labels May 5, 2023
@locao locao force-pushed the fix/cp-readiness-status branch from 8920f91 to 37640a7 Compare May 5, 2023 14:34
@locao locao marked this pull request as ready for review May 5, 2023 14:34
Copy link
Member

@gszr gszr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@locao locao merged commit c7de58c into master May 5, 2023
@locao locao deleted the fix/cp-readiness-status branch May 5, 2023 19:20
team-gateway-bot pushed a commit that referenced this pull request May 5, 2023
* fix(status): CP /status/ready return 503 when DB is off

Co-authored-by: Guilherme Salazar <gsz@acm.org>

* docs(CHANGELOG.md) update feature entry

---------

Co-authored-by: Guilherme Salazar <gsz@acm.org>
(cherry picked from commit c7de58c)
locao added a commit that referenced this pull request May 5, 2023
)

* fix(status): CP /status/ready return 503 when DB is off

Co-authored-by: Guilherme Salazar <gsz@acm.org>

* docs(CHANGELOG.md) update feature entry

---------

Co-authored-by: Guilherme Salazar <gsz@acm.org>
(cherry picked from commit c7de58c)

Co-authored-by: Vinicius Mignot <vinicius.mignot@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants