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

Simplify health check to ignore response #258

Merged
merged 1 commit into from
May 30, 2024
Merged

Conversation

nolancon
Copy link
Collaborator

@nolancon nolancon commented May 29, 2024

Description of your changes

Previously, the health check was a HTTP Get request to the hostBase address - however this equates to a ListBuckets S3 call on RGW. As such, a situation can arise where the request may not be authorized, resulting in a 403 error. This makes checking the response or response code a bit redundant.

Instead, this PR simplifies the health check to simply establish a connection with the hostBase address - if an error occurs or a connection cannot be made, then the health check will be deemed a failure, otherwise it is considered successful and the backend is marked as healthy.

I have:

  • Run make reviewable to ensure this PR is ready for review.
  • Run make ceph-chainsaw to validate these changes against Ceph. This step is not always necessary. However, for changes related to S3 calls it is sensible to validate against an actual Ceph cluster. Localstack is used in our CI Chainsaw suite for convenience and there can be disparity in S3 behaviours betwee it and Ceph. See docs/TESTING.md for information on how to run tests against a Ceph cluster.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

  • Unit tests edited
  • Manually checked
  • e2e suites make chainsaw and make ceph-chainsaw both passing.

@nolancon nolancon merged commit 6426bf3 into main May 30, 2024
10 checks passed
@nolancon nolancon deleted the health-check-simplify branch May 30, 2024 08:28
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.

2 participants