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 the "supress health checks when only one backing service" logic #17077

Merged
merged 3 commits into from
Oct 31, 2017

Conversation

knobunc
Copy link
Contributor

@knobunc knobunc commented Oct 27, 2017

This reverts commit 4833eb5 and then fixes the implementation.

Previously we had attempted to suppress the health checks, but it was looking at the endpoints of the service, not the servers that back the route. The problem is that if we just look at endpoints, then if a route has two backing services, each with one endpoint, we would incorrectly suppress the health checks.

Fixes bug 1507664 (https://bugzilla.redhat.com/show_bug.cgi?id=1507664)

This reverts commit 4833eb5.

This logic is not correct.  If a router is backed by two services, it
will misbehave.
@knobunc knobunc self-assigned this Oct 27, 2017
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 27, 2017
@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 27, 2017
Copy link
Contributor

@rajatchopra rajatchopra left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2017
@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 30, 2017
@knobunc knobunc changed the title WIP: Revert "Made the router skip health checks when there is one endpoint" Fix the "supress health checks when only one backing service" logic Oct 30, 2017
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 30, 2017
@knobunc
Copy link
Contributor Author

knobunc commented Oct 30, 2017

Ok, cleaned up the PR. The first commit is a complete reversion of my bad change. The second is just fixing a TODO, since I looked over the code and it is sane. The third is the correct change, and is the one that should be looked at in isolation to make better sense of the work.

@knobunc
Copy link
Contributor Author

knobunc commented Oct 30, 2017

/retest

@knobunc
Copy link
Contributor Author

knobunc commented Oct 30, 2017

@openshift/networking PTAL (but see comment #17077 (comment))

There was a TODO asking for the code to be reviewed.  I've done that, so I removed the TODO.
Previously we had attempted to suppress the health checks, but it was
looking at the endpoints of the service, not the servers that back the
route.  The problem is that if we just look at endpoints, then if a
route has two backing services, each with one endpoint, we would
incorrectly suppress the health checks.

Fixes bug 1507664 (https://bugzilla.redhat.com/show_bug.cgi?id=1507664)
Copy link
Contributor

@rajatchopra rajatchopra left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 30, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: knobunc, rajatchopra

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@knobunc
Copy link
Contributor Author

knobunc commented Oct 30, 2017

/retest

Copy link

@pravisankar pravisankar left a comment

Choose a reason for hiding this comment

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

LGTM

@knobunc
Copy link
Contributor Author

knobunc commented Oct 30, 2017

/kind bug

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 30, 2017
Copy link
Contributor

@pecameron pecameron left a comment

Choose a reason for hiding this comment

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

From the comment not sure what you are going for. The code seems to generate health check on a per service basis when the service has more than 1 endpoint. So if the route has 2 services, A and B, A has 1 endpoint and there is now health check for that service and B has 3 endpoints we would have health checks for that service. So if A and B both have 1 endpoint no health checks are needed for the route. Did I get that right?
Other than my fuzzy understanding this looks OK.

@pravisankar
Copy link

/retest

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit 1bae363 into openshift:master Oct 31, 2017
@knobunc knobunc deleted the fix/health-supression branch June 7, 2018 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/routing kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants