Fixes loss of updates after multiple on-demand vhds requests#12819
Fixes loss of updates after multiple on-demand vhds requests#12819htuch merged 18 commits intoenvoyproxy:masterfrom dmitri-d:fix-vhds-updates
Conversation
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
|
The idea of this PR is to watch on prefixes used in on-demand vhds. On subscription start a watch is created using route config name as the prefix. New requests update a watch with an alias, which is removed when a reply is received; the watch retains the prefix at all times, however. Any spontaneous update for an already resolved vhost, or an update that adds a new vhost will be handled by a watch that matches the prefix in resource names contained in the update. This bit is ugly and done to prevent sending of prefixes instead of resource names on subscription start: https://github.com/envoyproxy/envoy/pull/12819/files#diff-050ecb76fd3d458fd208a27e7c1a4e23R141. Instead, we send an empty request. This has implications on server ability to respond with a non-empty initial state. This needs more tests. ping @htuch, @stevenzzzz |
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
|
Also ping @chaoqin-li1123 |
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
htuch
left a comment
There was a problem hiding this comment.
@dmitri-d thanks for working on this bug. I'm trying to grok the logic here, the main question I have is why do we need to go through the alias subscribe/unsubscribe dance for new resources when we don't need to do this for resource updates? If we're going to propagate all prefix matched updates to the VHDS provider, can't the VHDS provider maintain all the alias information locally? I.e. we can get watches out of the business of reasoning about aliases.
include/envoy/config/grpc_mux.h
Outdated
| SubscriptionCallbacks& callbacks, | ||
| OpaqueResourceDecoder& resource_decoder) PURE; | ||
| OpaqueResourceDecoder& resource_decoder, | ||
| const bool use_prefix_matching) PURE; |
There was a problem hiding this comment.
@chaoqin-li1123 some variant of this might be useful for glob matching when subscribing to glob collections in the work you are doing. For udpa:// URLs, it's not a prefix on the path component (ignoring context parameters, which should be exact match).
The thought did occur to me; delta xds is tightly coupled with watch_map and subscription-state, the dance you are referring to is a way to create xds requests without changing watch-map and subscription-state interfaces. Let me see if I can skip creation of an alias watch without changing the interfaces much. |
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
@htuch: is this what you had in mind? |
htuch
left a comment
There was a problem hiding this comment.
@dmitri-d yes, exactly, this is a really nice simplification. Can you clean up the PR for review, e.g. comments, and get CI passing? I'll give a detailed review then, but this approach looks like the right stepping stone for glob collections and fixes the VHDS issue.
/wait
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
|
@htuch: I think this is ready for a review. |
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
|
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
|
ping @htuch |
htuch
left a comment
There was a problem hiding this comment.
LGTM. @chaoqin-li1123 can you take a pass to see if this aligns with your plans around udpa:// support?
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Please see #12158 for more details about the issue.