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

Changed the router to default to roundrobin when weights are used #12752

Conversation

knobunc
Copy link
Contributor

@knobunc knobunc commented Feb 1, 2017

If the route has weights set for the services it is associated with,
then we will set the default load balance policy to RoundRobin if no
policy is set with an annotation or as a global default with an
environment variable. Without this change the user would need to both
set the weights, and then set an annotation to change the default
balancing algorithm... which people almost always forgot to do.

For bug 1416869 (https://bugzilla.redhat.com/show_bug.cgi?id=1416869)

@knobunc knobunc force-pushed the bug/bz1416869-make-split-routes-default-change branch from 67f448b to 686d7b6 Compare February 1, 2017 15:23
@knobunc
Copy link
Contributor Author

knobunc commented Feb 1, 2017

@openshift/networking PTAL

@knobunc knobunc self-assigned this Feb 1, 2017
@knobunc
Copy link
Contributor Author

knobunc commented Feb 1, 2017

[test]

key := fmt.Sprintf("%s/%s", route.Namespace, route.Spec.To.Name)
if route.Spec.To.Weight == nil {
serviceUnits[key] = 0
} else {
serviceUnits[key] = *route.Spec.To.Weight
hasWeights = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this check be that there is more than one service? A route with weight 100 and one backend should behave exactly the same as a route with weight 1 and one backend.

@knobunc knobunc force-pushed the bug/bz1416869-make-split-routes-default-change branch from 686d7b6 to 58af634 Compare February 1, 2017 18:57
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

@smarterclayton
Copy link
Contributor

change the e2e test for weighted router to remove the balance annotations

Copy link
Contributor

@ramr ramr 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 knobunc force-pushed the bug/bz1416869-make-split-routes-default-change branch from 58af634 to f39b6a7 Compare February 2, 2017 14:38
If the route is associated with multiple services then we will set the
default load balance policy to RoundRobin if no policy is set with an
annotation or as a global default with an environment variable.
Without this change the user would need to both set the services,
weights, and then set an annotation to change the default balancing
algorithm... which people almost always forgot to do.

For bug 1416869 (https://bugzilla.redhat.com/show_bug.cgi?id=1416869)
@knobunc knobunc force-pushed the bug/bz1416869-make-split-routes-default-change branch from f39b6a7 to 0ddebc1 Compare February 2, 2017 14:40
@knobunc
Copy link
Contributor Author

knobunc commented Feb 2, 2017

@smarterclayton Good call. I was contemplating the tests this morning, and that's a clean way to do it.

@smarterclayton
Copy link
Contributor

smarterclayton commented Feb 2, 2017 via email

@knobunc
Copy link
Contributor Author

knobunc commented Feb 2, 2017

[test] last failure was due to subscription-manager not getting a subscription

@knobunc
Copy link
Contributor Author

knobunc commented Feb 3, 2017

[test] last was (now resolved) flake #12736

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 0ddebc1

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13561/) (Base Commit: e2e5d9e)

@knobunc
Copy link
Contributor Author

knobunc commented Feb 3, 2017

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 0ddebc1

@openshift-bot
Copy link
Contributor

openshift-bot commented Feb 3, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13572/) (Base Commit: a1c66f9) (Image: devenv-rhel7_5847)

@openshift-bot openshift-bot merged commit 5565661 into openshift:master Feb 3, 2017
@knobunc knobunc deleted the bug/bz1416869-make-split-routes-default-change branch January 8, 2018 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants