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

do not add previous hosts predicate when consistent hashing is enabled #50759

Merged

Conversation

ramaraochavali
Copy link
Contributor

@ramaraochavali ramaraochavali commented Apr 30, 2024

Fixes #50756

  • Ambient
  • Configuration Infrastructure
  • Docs
  • Dual Stack
  • Installation
  • Networking
  • Performance and Scalability
  • Policies and Telemetry
  • Security
  • Test and Release
  • User Experience
  • Developer Infrastructure

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@ramaraochavali ramaraochavali requested a review from a team as a code owner April 30, 2024 10:26
@istio-policy-bot istio-policy-bot added the release-notes-none Indicates a PR that does not require release notes. label Apr 30, 2024
@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 30, 2024
@@ -73,7 +90,6 @@ func ConvertPolicy(in *networking.HTTPRetry) *route.RetryPolicy {
}

// A policy was specified. Start with the default and override with user-provided fields where appropriate.
out := DefaultPolicy()
Copy link
Member

Choose a reason for hiding this comment

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

donot we need to distinguish hash here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is moved up and handle both cases

Copy link
Member

Choose a reason for hiding this comment

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

IC, nvm

if len(in.Route) == 1 {
hostnames = append(hostnames, processDestination(in.Route[0], serviceRegistry, listenerPort, hashByDestination, out, action))
hash := hashByDestination[in.Route[0]]
consistentHash = hash != nil
Copy link
Member

Choose a reason for hiding this comment

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

How do you handle consitent hash for the below else branch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

consistent hash and weighted desitnations do not work together

Copy link
Member

Choose a reason for hiding this comment

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

do we have validation that checked it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not think we have - but we should add IMO (atleast warn)

@ramaraochavali
Copy link
Contributor Author

@hzxuzhonghu can you PTAL when you get chance?

@ramaraochavali
Copy link
Contributor Author

@howardjohn @hzxuzhonghu Can you PTAL when you get chance?

@ramaraochavali
Copy link
Contributor Author

@hzxuzhonghu Can you PTAL when you get chance?

@istio-testing istio-testing merged commit 3727b57 into istio:master May 14, 2024
28 checks passed
@ramaraochavali ramaraochavali deleted the fix/remove_previous_hosts branch May 14, 2024 14:36
Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to unset "retry_host_predicate" using EnvoyFilter?
5 participants