-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
add http2 ping health checks #8431
Conversation
It looks like there is a bug with how the proxy is set (I have it using the same inject address function as http, but it shouldn't have https/http or slashes in the schema). I will fix this issue tonight. |
It actually appears that proxies do not support ping https://tools.ietf.org/html/rfc7540#section-8.3 (please correct me if my understanding is incorrect) so I will just remove all proxy references completely |
6776933
to
66872a5
Compare
I just realized that the contributing check lists cover this change so I have made many of the missing changes and am pasting it below. I plan to update the documentation and give this list another look this weekend. I apologize for the unintended incompleteness of this pull request.
|
addf929
to
7693f38
Compare
I have added documentation and another test. I think this pull request should be ready for review now |
dd44a80
to
bbc6963
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, this looks really good!
Sorry it took us so long to respond. Unfortunately there are a number of conflicts now that need to be resolved.
I think once this is rebased to resolve the conflicts, and the additional test is added, this should be ready to merge.
bbc6963
to
ef089fc
Compare
1b71b92
to
0522caa
Compare
Thank you for the review, I added the test for cert failure and rebased but still need to work on getting all of the tests to pass and catching up on syncing this new feature with more recent changes to the codebase (ex: proto buffers). I hope to have time to complete the rest of this work sometime this week |
3dd0834
to
c4cd25c
Compare
c4cd25c
to
493cf67
Compare
@dnephin this pull request should be good to be looked over again. I hope it is okay that I added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for implementing this change! Looks great!
I made a couple very minor suggestions. I'm going to apply those changes, and if the tests are still happy I think this is ready to merge.
I noticed that some of the checks use a WaitGroup to wait for the goroutine to stop. An example of adding that is 1910e2a. It's not strictly necessary, but can help prevent flaky tests and makes it easier to detect goroutine leaks in tests if we wait on ones we expect to shutdown. That might be a good addition to this check, as a follow up, if you are interested.
I also noticed the HTTP check supports a proxy. Would a proxy be appropriate for H2 checks as well? Not something we need to add right away, but maybe we could track adding that in a github issue in case it is useful for someone.
Yes, that's perfect, thank you for making the change! |
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/348014. |
Hi @dnephin, thank you for the approval and suggestions. After briefly reviewing the CONNECT method on the http2 RFC, it seems like it might not support ping frames, but I have not had direct experience with proxies over http2 so I could be mistaken and will look into this further. I created a PR for WaitGroups and also added graceful shutdown of the client connection (which I only just noticed was not implemented- apologies for missing it earlier) #9995. I hope that it is okay that I combined both the WaitGroup feature and the quick fix to gracefully close connections in the same PR- I am happy to separate them if necessary. |
This pull request adds http2 ping health checks and would close #6260. Some tests are failing locally, but the errors seem unrelated.