delta-xds: avoid sending resource names for wildcard requests on stream reconnect#16153
Merged
yanavlasov merged 6 commits intoenvoyproxy:mainfrom Apr 28, 2021
Merged
Conversation
…am reconnect Signed-off-by: Adi Suissa-Peleg <[email protected]>
Signed-off-by: Adi Suissa-Peleg <[email protected]>
dmitri-d
reviewed
Apr 23, 2021
| grpc_mux_->onDiscoveryResponse(std::move(response), control_plane_stats_); | ||
| } | ||
| // Send another response with a different resource, but where EDS is paused. | ||
| auto resume_cds = grpc_mux_->pause(type_url); |
Contributor
There was a problem hiding this comment.
Why did you add an update with a paused mux to this test?
Contributor
Author
There was a problem hiding this comment.
This is done to emulate a disconnect before an ack is sent from the client, and ensure that the message on reconnect does include the new resource.
I'll add some comments to this test.
Contributor
|
lgtm, other than a small question re: test. |
Signed-off-by: Adi Suissa-Peleg <[email protected]>
…_resources Signed-off-by: Adi Suissa-Peleg <[email protected]>
Contributor
Author
|
/assign @stevenzzzz |
stevenzzzz
previously approved these changes
Apr 26, 2021
api/xds_protocol.rst
Outdated
| :ref:`initial_resource_versions <envoy_api_field_DeltaDiscoveryRequest.initial_resource_versions>`. | ||
| Because no state is assumed to be preserved from the previous stream, the reconnecting | ||
| client must provide the server with all resource names it is interested in. Note that for wildcard | ||
| requests (e.g., CDS/LDS), the request must have no resources in both |
Contributor
There was a problem hiding this comment.
srds is wildcard as well.
Signed-off-by: Adi Suissa-Peleg <[email protected]>
…_resources Signed-off-by: Adi Suissa-Peleg <[email protected]>
Contributor
Author
|
/assign @htuch |
lizan
approved these changes
Apr 27, 2021
yanavlasov
approved these changes
Apr 28, 2021
gokulnair
pushed a commit
to gokulnair/envoy
that referenced
this pull request
May 6, 2021
…am reconnect (envoyproxy#16153) Signed-off-by: Adi Suissa-Peleg <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
gokulnair
pushed a commit
to gokulnair/envoy
that referenced
this pull request
May 6, 2021
…am reconnect (envoyproxy#16153) Signed-off-by: Adi Suissa-Peleg <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
This was referenced Jan 21, 2022
rboyer
added a commit
to hashicorp/consul
that referenced
this pull request
Jan 25, 2022
When a wildcard xDS type (LDS/CDS/SRDS) reconnects from a delta xDS stream, prior to envoy `1.19.0` it would populate the `ResourceNamesSubscribe` field with the full list of currently subscribed items, instead of simply omitting it to infer that it wanted everything (which is what wildcard mode means). This upstream issue was filed in envoyproxy/envoy#16063 and fixed in envoyproxy/envoy#16153 which went out in Envoy `1.19.0` and is fixed in later versions (later refactored in envoyproxy/envoy#16855). This PR conditionally forces LDS/CDS to be wildcard-only even when the connected Envoy requests a non-wildcard subscription, but only does so on versions prior to `1.19.0`, as we should not need to do this on later versions. This fixes the failure case as described here: #11833 (comment) Co-authored-by: Huan Wang <[email protected]>
hc-github-team-consul-core
pushed a commit
to hashicorp/consul
that referenced
this pull request
Jan 25, 2022
When a wildcard xDS type (LDS/CDS/SRDS) reconnects from a delta xDS stream, prior to envoy `1.19.0` it would populate the `ResourceNamesSubscribe` field with the full list of currently subscribed items, instead of simply omitting it to infer that it wanted everything (which is what wildcard mode means). This upstream issue was filed in envoyproxy/envoy#16063 and fixed in envoyproxy/envoy#16153 which went out in Envoy `1.19.0` and is fixed in later versions (later refactored in envoyproxy/envoy#16855). This PR conditionally forces LDS/CDS to be wildcard-only even when the connected Envoy requests a non-wildcard subscription, but only does so on versions prior to `1.19.0`, as we should not need to do this on later versions. This fixes the failure case as described here: #11833 (comment) Co-authored-by: Huan Wang <[email protected]>
rboyer
added a commit
to hashicorp/consul
that referenced
this pull request
Jan 25, 2022
When a wildcard xDS type (LDS/CDS/SRDS) reconnects from a delta xDS stream, prior to envoy `1.19.0` it would populate the `ResourceNamesSubscribe` field with the full list of currently subscribed items, instead of simply omitting it to infer that it wanted everything (which is what wildcard mode means). This upstream issue was filed in envoyproxy/envoy#16063 and fixed in envoyproxy/envoy#16153 which went out in Envoy `1.19.0` and is fixed in later versions (later refactored in envoyproxy/envoy#16855). This PR conditionally forces LDS/CDS to be wildcard-only even when the connected Envoy requests a non-wildcard subscription, but only does so on versions prior to `1.19.0`, as we should not need to do this on later versions. This fixes the failure case as described here: #11833 (comment) Co-authored-by: Huan Wang <[email protected]>
rboyer
added a commit
to hashicorp/consul
that referenced
this pull request
Jan 25, 2022
When a wildcard xDS type (LDS/CDS/SRDS) reconnects from a delta xDS stream, prior to envoy `1.19.0` it would populate the `ResourceNamesSubscribe` field with the full list of currently subscribed items, instead of simply omitting it to infer that it wanted everything (which is what wildcard mode means). This upstream issue was filed in envoyproxy/envoy#16063 and fixed in envoyproxy/envoy#16153 which went out in Envoy `1.19.0` and is fixed in later versions (later refactored in envoyproxy/envoy#16855). This PR conditionally forces LDS/CDS to be wildcard-only even when the connected Envoy requests a non-wildcard subscription, but only does so on versions prior to `1.19.0`, as we should not need to do this on later versions. This fixes the failure case as described here: #11833 (comment) Co-authored-by: Huan Wang <[email protected]> Co-authored-by: Huan Wang <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: delta-xds: avoid sending resource names for wildcard requests on stream reconnect
Additional Description:
Avoiding sending resource names for wildcard requests after the stream is dropped.
The resources are sent in
initial_resource_versions, but the new request must have no resources inresource_names_subscribeso the server will understand this is a wildcard request.Risk Level: Medium? breaks current behavior, which is incorrect.
Testing: Added unit and integration tests.
Docs Changes: Updated xds docs.
Release Notes: N/A.
Platform Specific Features: N/A.
Fixes #16063
Signed-off-by: Adi Suissa-Peleg [email protected]