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

http health check bug fixes #16697

Merged
merged 1 commit into from
Oct 13, 2023
Merged

Conversation

chaochn47
Copy link
Member

@chaochn47 chaochn47 commented Oct 6, 2023

Part of #16007

Discovered by reviewing #16651

@siyuanfoundation @serathius

@chaochn47 chaochn47 force-pushed the health_check_bug_fix branch from 195b585 to a2b57bd Compare October 6, 2023 07:00
@serathius
Copy link
Member

serathius commented Oct 6, 2023

Couple of high level questions

To clarify this PR makes etcd healthcheck work when authorization is enabled. Without it checking health is short circuited by permission denied error and doesn't validate reading db at all. Is this correct?

Do you plan to backport this change? Even though the check is not useful, I would prefer to avoid making a change in old releases. Better to ask users to migrate to new /health endpoint then just surprize them with the change.

How have you tested the change? Have you considered testing it manually that everything works? Adding an e2e tests or verifying that this feature is covered by testing would also be appreciated.

@siyuanfoundation
Copy link
Contributor

lgtm

@chaochn47
Copy link
Member Author

To clarify this PR makes etcd healthcheck work when authorization is enabled. Without it checking health is short circuited by permission denied error and doesn't validate reading db at all. Is this correct?

Correct.

Do you plan to backport this change? Even though the check is not useful, I would prefer to avoid making a change in old releases. Better to ask users to migrate to new /health endpoint then just surprize them with the change.

No plan to backport this change.

I agree we should ask users to migrate to /livez and /readyz. It forces them to test with their environment. This change is just for consistency between the serializable read checker in /health and /livez.

How have you tested the change? Have you considered testing it manually that everything works? Adding an e2e tests or verifying that this feature is covered by testing would also be appreciated.

Yeah, test is in progress.. refer #16698

@ahrtr
Copy link
Member

ahrtr commented Oct 6, 2023

Yeah, test is in progress.. refer #16698

My understanding is the test in the PR should all pass on top of this PR. Pls verify that and feedback the result, thx.

@chaochn47 chaochn47 force-pushed the health_check_bug_fix branch 2 times, most recently from dc1474c to a8a74eb Compare October 12, 2023 23:12
@chaochn47 chaochn47 force-pushed the health_check_bug_fix branch from a8a74eb to c25f1df Compare October 12, 2023 23:59
@fuweid
Copy link
Member

fuweid commented Oct 13, 2023

Hi @chaochn47 the change looks good. but it seems that the change has been covered by #16651....

@chaochn47
Copy link
Member Author

chaochn47 commented Oct 13, 2023

Hi @chaochn47 the change looks good. but it seems that the change has been covered by #16651....

Yeah, #16651 /livez and /readyzis the future.

This PR is the bug fix backported to /health discovered when reviewing #16651 as the top comment mentions~

Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@ahrtr ahrtr merged commit bc0f724 into etcd-io:main Oct 13, 2023
27 checks passed
@chaochn47 chaochn47 deleted the health_check_bug_fix branch October 13, 2023 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants