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

health check: add support health checking EDS endpoints with different port #3007

Merged
merged 16 commits into from
Apr 16, 2018
Merged

health check: add support health checking EDS endpoints with different port #3007

merged 16 commits into from
Apr 16, 2018

Conversation

dio
Copy link
Member

@dio dio commented Apr 5, 2018

health check: add support health checking EDS endpoints with different port

This patch adds a way to override endpoint health check port.

Only EDS cluster is affected for now.

Risk Level:

  • Low. This is an optional feature.

Testing:

  • Unit test

Docs Changes:
To be updated (unhiding)

Release Notes:
To be updated

Partially remedies #439

API Changes:
To be updated (unhiding)

Signed-off-by: Dhi Aurrahman [email protected]

@dio dio closed this Apr 5, 2018
Signed-off-by: Dhi Aurrahman <[email protected]>
@dio dio reopened this Apr 5, 2018
Signed-off-by: Dhi Aurrahman <[email protected]>
@dio dio closed this Apr 5, 2018
dio added 3 commits April 6, 2018 07:49
Signed-off-by: Dhi Aurrahman <[email protected]>
Signed-off-by: Dhi Aurrahman <[email protected]>
@dio dio reopened this Apr 6, 2018
@dio dio closed this Apr 6, 2018
Signed-off-by: Dhi Aurrahman <[email protected]>
@dio dio reopened this Apr 6, 2018
@dio dio closed this Apr 6, 2018
Signed-off-by: Dhi Aurrahman <[email protected]>
@dio dio reopened this Apr 6, 2018
Signed-off-by: Dhi Aurrahman <[email protected]>
@dio
Copy link
Member Author

dio commented Apr 6, 2018

Sorry for the noise. Had trouble with ASAN but couldn't catch it in my local (I have a very slow 2009 MacBook 😆)

@ccaraman ccaraman self-assigned this Apr 6, 2018
@dnoe dnoe requested a review from htuch April 9, 2018 15:00
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM, two minor comments.

/**
* Create a health check connection for this host.
* @param dispatcher supplies the owning dispatcher.
* @param options supplies the socket options that will be set on the new connection.
Copy link
Member

Choose a reason for hiding this comment

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

I think socket options can be dropped here for now, as it's not used. We can add it back later as needed.

Copy link
Member Author

@dio dio Apr 11, 2018

Choose a reason for hiding this comment

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

OK got it. I have updated it.

@@ -346,8 +372,12 @@ class HttpHealthCheckerImplTest : public testing::Test {
NiceMock<Runtime::MockRandomGenerator> random_;
std::list<uint32_t> connection_index_{};
std::list<uint32_t> codec_index_{};
const static HostWithHealthCheckMap health_checker_map_;
Copy link
Member

Choose a reason for hiding this comment

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

Why static?

Copy link
Member Author

@dio dio Apr 11, 2018

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I think it would be preferable to do method overloading here than using a default arg; we're a bit allergic to the use of static non-PoD in the Envoy code base due to static initializaiton fiasco; even though it's probably perfectly safe here, it would be cleaner to just do method overloading in this use case.

Copy link
Member Author

Choose a reason for hiding this comment

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

Got it. Hopefully, f2b5a32 is fine.

dio added 4 commits April 11, 2018 20:40
Signed-off-by: Dhi Aurrahman <[email protected]>
Signed-off-by: Dhi Aurrahman <[email protected]>
Signed-off-by: Dhi Aurrahman <[email protected]>
@htuch
Copy link
Member

htuch commented Apr 15, 2018

LGTM, needs master merge and we can ship.

@dio
Copy link
Member Author

dio commented Apr 16, 2018

@htuch OK. master is merged into this PR branch now. Thanks!

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

3 participants