-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
sds: Ignore Delta Removals #32961
sds: Ignore Delta Removals #32961
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this issue!
Overall I think this is ok, but I think more tests are needed.
Specifically I think we need to ensure that the owning cluster/listener are actually removing the resource prior to receiving a response with a removed_resources
,
and tests that exercise the different validation paths.
Thanks for the review @adisuissa!
I'm still getting up to speed on Envoy's testing approaches; is there a section of the integration tests that allow testing the dependent resource flow (specifically with SDS)? |
There are a bunch of tests in https://github.com/envoyproxy/envoy/blob/main/test/integration/sds_dynamic_integration_test.cc and in https://github.com/envoyproxy/envoy/blob/main/test/integration/sds_generic_secret_integration_test.cc. If you want to look at a more comprehensive test that includes many xDS types that are delivered to the Envoy, then the ads_integration_test.cc would probably be where they are, but I cannot recall if there are tests covering SDS there. |
I added an integration test that I think covers this; I'd appreciate feedback! I also modified the implementation so that removing a secret won't complete cluster warming. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, thanks!
Left on comment on the organization of the integration test, but otherwise LGTM.
Assigning Harvey as a senior-maintainer reviewer in the domain. |
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
e7c0b3d
to
3be0b53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
One minor comment.
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
/retest |
3 similar comments
/retest |
/retest |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is right - if you look at what eds.cc is doing, it just ignores the removed resources for delta. LGTM modulo comments.
source/common/secret/sds_api.cc
Outdated
|
||
if (removed_resources.size() == 1) { | ||
// We only removed a resource here; don't go through the SotW init process | ||
// and expect this to be cleaned up by the owning cluster or listener. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please expand on the comment here. I think the key idea is this is a singleton resource subscription, so in normal operation, an xDS server should not be removing the resource until the referencing cluster / listener is no longer using it.
@adisuissa why don't we structurally forbid singleton resource subscriptions from having removals in the baseline xDS infra, wondering why something like SDS needs to worry about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to enforcing this in the generic xDS machinery. I also think more documentation around "singleton" resources would be helpful as well; in any case, I've expanded the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I completely agree that it should be maintained by the xDS infra, although at the moment we have per-type handlers.
Note that singleton resource subscription should not be determined by the type, but by the subscription (unfortunately at the moment it is highly dependent). For SDS, there is a request to support a collection subscription in addition to singletons.
The proposal in #24773 should address this (and other things as well).
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Fixes envoyproxy#24373 and envoyproxy#32832 Risk Level: Low Testing: Manual testing with the Istio scenario described in envoyproxy#32832. Investigating how to add a unit test Release Notes: Delta SDS removals will no longer result in a "Missing SDS resources" error message Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Istio has very few maintainers here and though I'm still learning, I've contributed a handful of upstream envoy PRs as well as 2 recent changes to istio-proxy's telemetry. If existing maintainers have other areas they'd like to see more contributions in, I welcome the feedback! PRs: - envoyproxy/envoy#35074 - envoyproxy/envoy#33857 - envoyproxy/envoy#33362 - envoyproxy/envoy#32961 - istio/proxy#5617 - istio/proxy#5514
Istio has very few maintainers here and though I'm still learning, I've contributed a handful of upstream envoy PRs as well as 2 recent changes to istio-proxy's telemetry. If existing maintainers have other areas they'd like to see more contributions in, I welcome the feedback! PRs: - envoyproxy/envoy#35074 - envoyproxy/envoy#33857 - envoyproxy/envoy#33362 - envoyproxy/envoy#32961 - istio/proxy#5617 - istio/proxy#5514
Commit Message: Ignore Delta SDS removals
Additional Description: Fixes #24373 and #32832
Risk Level: Low
Testing: Manual testing with the Istio scenario described in #32832. Investigating how to add a unit test
Docs Changes:
Release Notes: Delta SDS removals will no longer result in a "Missing SDS resources" error message
Platform Specific Features: