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

Backport of NET-2904 Fixes API Gateway Route Service Weight Division Error into release/1.15.x #16540

Conversation

hc-github-team-consul-core
Copy link
Collaborator

@hc-github-team-consul-core hc-github-team-consul-core commented Mar 6, 2023

Backport

This PR is auto-generated from #16531 to be assessed for backporting due to the inclusion of the label backport/1.15.

The below text is copied from the body of the original PR.


Description

Fixes HTTPRoutes with weights that don't divide evenly into 10000.
Previously, if a user created an HTTPRoute with services that had weights that did not divide evenly into 10000, (for example, two services, one with weight=1 and one with weight=2), they would never be registered properly so no traffic would go to them.
Now the weights will be normalized.

Testing & Reproduction steps

Start consul with changes from branch
Use this gist to setup HTTPRoute services that have weights that do not divide evenly into 10000
Go to http://localhost:19000 , click on config-dump, and look at the "dynamic_route_configs" to see the route weights adding up to 10000.

Links

Fixes #16455

PR Checklist

  • updated test coverage
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/net-2904-apigw-http-route-service-weight-division-error/annually-prime-chimp branch from 8f7d62d to a95d028 Compare March 6, 2023 13:42
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 6, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@andrewstucki andrewstucki force-pushed the backport/net-2904-apigw-http-route-service-weight-division-error/annually-prime-chimp branch from e474b05 to 456703d Compare March 6, 2023 14:47
@andrewstucki andrewstucki marked this pull request as ready for review March 6, 2023 14:47
@andrewstucki andrewstucki merged commit 88496d7 into release/1.15.x Mar 6, 2023
@andrewstucki andrewstucki deleted the backport/net-2904-apigw-http-route-service-weight-division-error/annually-prime-chimp branch March 6, 2023 15:11
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.

5 participants