-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Support mixed v2/v3 xDS request/responses #10776
Comments
Will it be a mandatory part of the spec for other data planes, e.g. gRPC? |
@markdroth thoughts on #10776 (comment)? |
FWIW, I think to make this sane, the client would have to NACK if it didn't know about v3. I believe this is what would happen if you tried this with an older Envoy today, since it would be receiving the wrong typed resource. |
@ejona86, @dfawley, and I are still in the early stages of discussing how gRPC will migrate to v3, so I don't have any concrete answers for you yet. My off-the-cuff reaction is that it seems very strange to allow a management server to respond with what is fundamentally a different resource type (because the type_url is different) than the one requested. Wouldn't it be simpler to just change the clients to request the new versions? |
I tried this with a go-control-plane integration test envoyproxy/go-control-plane#290 and looks like envoy rejects the DiscoveryResponse if the typeUrl does not match the request typeurl. error: https://github.com/envoyproxy/envoy/blob/master/source/common/config/grpc_mux_impl.cc#L165
In order to get through this error, I ended up setting the
https://github.com/envoyproxy/envoy/blob/master/source/common/config/grpc_mux_impl.cc#L131
|
So this work hasn't been implemented in previous Envoy. Even if we decide to integrate this feature now, it wouldn't have much effect before several releases. |
@seflerZ why wouldn't this be available in Istio 1.7? We will have a new Envoy release before that. |
I've been trying to grok v2 -> v3 and what I should do as a control plane author to migrate. I'm still confused as it seems v3 is preferred but even if I configure Envoy 1.14 with This might be a separate issue and potentially even a bug related to ADS so I'll happily file it separately if that's the case but I'm confused enough at this point that I'm not sure if I'm just experiencing the same issue described here and there is no no current solution, or if I'm still holding it wrong? |
@banks have you set the |
🤦 thanks @htuch, I was indeed holding it wrong. I looked around for some other config for resources and/or examples but somehow missed that. Just in case anyone else hits this you need to set this under the ConfigSource (i.e. |
@htuch I'm a bit confused. According to this doc. The v3 objects may be transferred over the v2 transport protocol. So why do we need to support mixed response? I think we just need to do cast directly. |
@banks this is actually already in the FAQ at https://www.envoyproxy.io/docs/envoy/latest/faq/api/envoy_v3, so no need for another entry. |
Tagging for collection in #10943 |
Was missing specific config for LDS/CDS, apparently it does not inherit whatever ADS has. envoyproxy/envoy#10776 (comment)
Was missing specific config for LDS/CDS, apparently it does not inherit whatever ADS has. envoyproxy/envoy#10776 (comment)
Was missing specific config for LDS/CDS, apparently it does not inherit whatever ADS has. envoyproxy/envoy#10776 (comment)
/cc stevenzzzz |
question here: can we have both V2 and V3 subscriptions via the same ADS, say
what's the correct move now? do we allow V3 subscription to handle the response by upgrading the type-url to v3 and find a watch? |
If you want mixed requests/responses, v2 and v3 don't constitute real distinct namespaces IMHO, if you subscribe to resource Foo as v2 in RDS with resource version v2 and Foo on some other RDS with resource version v3, you get back the exact same resource in both cases, even though the management server will see distinct discovery requests. At least, if you want this interop. Since you raise this point, I think we should runtime flag protect this, since it might confuse some existing users who have made a disjointness assumption. @chaoqin-li1123 can you add a runtime flag which basically says |
that sounds good, thanks! |
To better support rollouts where the control plane switches from v2 to v3, we should be able to support a DiscoveryResponse with a v3 resource to a DiscoveryRequest for a v2 previous version resource.
Envoy may already support this. We need to look at the behavior of gRPC mux watchers, there might need to be some modifications needed there. In addition, tests and documentation are required.
The text was updated successfully, but these errors were encountered: