-
Notifications
You must be signed in to change notification settings - Fork 688
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
Envoy cluster creation issue with conflicting service names #4354
Comments
@kflynn has requested debug logs via Slack, so I'm attaching them here. I began capturing these logs from just prior to applying the mapping in the |
Here's the smoking gun from the logs:
The service name There are a few possible fixes, but I think I would start by trying this patch:
Unfortunately I won't be able to test that until at least tomorrow, but I think it should work – it makes sure that the short name both has some human-readable aspects for matching clusters to |
I can confirm that the above patch has resolved our issues in our dev cluster. We'll attempt to deploy a custom docker image with changes to production in the coming days. Thanks a ton for the quick turnaround! |
…hat don't collide. Fixes #4354. Signed-off-by: Flynn <emissary@flynn.kodachi.com>
…hat don't collide. Fixes #4354. Signed-off-by: Flynn <emissary@flynn.kodachi.com>
We deployed a locally built patched version of emissary to our production cluster 2 weeks ago and are happy to report that the patch resolved the issue for us. Thanks again for the quick turnaround on this. |
…hat don't collide. Fixes #4354. Signed-off-by: Flynn <emissary@flynn.kodachi.com>
…hat don't collide. Fixes #4354. Signed-off-by: Flynn <emissary@flynn.kodachi.com>
Describe the bug
When emissary is creating envoy clusters, emissary is evidently constrained by a character limit for the length of the cluster and must handle potential naming conflicts. If a mapping and service are named identically in different namespaces, and the name of the service is over a certain number of characters, there seems to be a condition that causes envoy cluster creation for one of those mappings to fail.
To Reproduce
I have a simple nginx pod in each namespace with
hello-alpha
andhello-beta
as the matching label selector.The following route will be created in envoy according to the debug GUI
alpha
namespace.Once the mapping is created, it will now "take over" the envoy cluster with the
-0
suffix, and the endpoints for this cluster will be updated to point to the alpha pod.However, the mapping for beta will still be pointing to the envoy cluster named
cluster_http___hello_this_name_is_too_lo-0
. This causes traffic destined for the beta instance to be routed to the alpha instance instead.Before creating the alpha mapping, if I hit the ClusterIP of the emissary-ingress service, requests for
/hello-beta
are routed to the beta pod correctly.After creating the alpha mapping, requests for
/hello-beta
are send to thehello-alpha
podAdditionally, the emissary pod logs the following error:
This would suggest to me that the
beta
mapping should get a route that points to a new envoy cluster namedcluster_http___hello_this_name_is_too_lo-1
. However, this cluster is not being created correctly. I haven't been able to spot anything in the logs that would suggest why this cluster is not being created.Expected behavior
The new envoy cluster should be created and the "beta" route should be correctly updated to point to the new cluster.
Versions:
The text was updated successfully, but these errors were encountered: