Skip to content

Vhds readme#7415

Merged
htuch merged 29 commits intoenvoyproxy:masterfrom
brian-avery:vhds_readme
Dec 13, 2019
Merged

Vhds readme#7415
htuch merged 29 commits intoenvoyproxy:masterfrom
brian-avery:vhds_readme

Conversation

@brian-avery
Copy link
Copy Markdown
Member

For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md

Description: Adds documentation for on-demand VHDS/RDS
Risk Level:
Testing:
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]

@mattklein123
Copy link
Copy Markdown
Member

Drive by: Can this instead be in the public docs vs. a markdown file? We should be talking about this probably in these locations:
https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/operations/dynamic_configuration
https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol (maybe if anything is different here)
https://www.envoyproxy.io/docs/envoy/latest/configuration/http_conn_man/rds

Thank you!

@lambdai
Copy link
Copy Markdown
Contributor

lambdai commented Jun 27, 2019

BTW: IIRC we are moving docs to docs/root/ with .rst instead of .md. I could be wrong.

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Agree with the other comments that this probably belongs as a peer or nested documented with https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol.
/wait

Comment thread source/docs/ondemand_rds_vhds.md Outdated
Comment thread source/docs/ondemand_rds_vhds.md Outdated
Comment thread source/docs/ondemand_rds_vhds.md Outdated
@mattklein123
Copy link
Copy Markdown
Member

High level comment. Can we please add references to VHDS from the other places that I mentioned? There should be docs in the HTTP arch overview, etc. Basically I think anywhere we mention scoped RDS we should also mention this. Thank you.

/wait

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, a bunch of other feedback.
/wait

Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndresGuedez to review this section.

Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
@stale
Copy link
Copy Markdown

stale Bot commented Jul 16, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale Bot added the stale stalebot believes this issue/PR has not been touched recently label Jul 16, 2019
Copy link
Copy Markdown
Contributor

@AndresGuedez AndresGuedez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed SRDS section and left comments primarily related to adding context and clarifying implications.

Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both approaches

It's unclear which approaches this is referencing.

I agree VHDS doesn't conflict with SRDS; some :ref: pointers to SRDS documentation would be helpful to provide context.

I think it's worth pointing out in this section that using SRDS + RDS + VHDS means that two on-demand subscriptions per routing scope will be required; e.g., when a new ScopedRouteConfiguration is distributed via SRDS, an RDS subscription for the associated RouteConfiguration will be initiated, which may itself trigger a VHDS subscription.

Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
@stale stale Bot removed the stale stalebot believes this issue/PR has not been touched recently label Jul 22, 2019
@stale
Copy link
Copy Markdown

stale Bot commented Jul 29, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale Bot added the stale stalebot believes this issue/PR has not been touched recently label Jul 29, 2019
@stale
Copy link
Copy Markdown

stale Bot commented Aug 5, 2019

This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale Bot closed this Aug 5, 2019
@brian-avery
Copy link
Copy Markdown
Member Author

/reopen

@mattklein123 mattklein123 reopened this Aug 5, 2019
@stale stale Bot removed the stale stalebot believes this issue/PR has not been touched recently label Aug 5, 2019
@mattklein123 mattklein123 added the no stalebot Disables stalebot from closing an issue label Aug 5, 2019
@mattklein123
Copy link
Copy Markdown
Member

Closing, we can merge this into #8617

@mattklein123
Copy link
Copy Markdown
Member

Reopening as it seems like we are going to finish this out. This should include arch docs, detailed config docs, etc. please look at all the places RDS, SRDS, routing, etc. are mentioned and make sure include VHDS also. Thanks!

Comment thread api/ondemand_vhds_rds_protocol.rst Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the use-case for this? There currently isn't a way for Envoy to trigger an unsubscribe for a vhost.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps @htuch can answer this...

Signed-off-by: Brian Avery <bavery@redhat.com>
-
Signed-off-by: Brian Avery <bavery@redhat.com>
the active stream is paused while a :ref:`DeltaDiscoveryRequest <envoy_api_msg_DeltaDiscoveryRequest>` is sent.
When a :ref:`DeltaDiscoveryResponse <envoy_api_msg_DeltaDiscoveryResponse>` is
recieved where the host/authority header values exactly matches the
:ref:`aliases <envoy_api_field_resource.aliases>`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name and aliases fields will have values in the form <route configuration name>/<host entry>, right? Those are the names that are used in the VHDS request, so that's what the resources have to be named in order to match.

I think the check here should be that the name or aliases fields match the route configuration name and host/authority header value in the format specified above.

:ref:`DeltaDiscoveryResponse <envoy_api_msg_DeltaDiscoveryResponse>` in which
the :ref:`resources <envoy_api_field_DeltaDiscoveryResponse.resources>` entry
for that virtual host has the :ref:`name <envoy_api_field_resource.name>` and
:ref:`aliases <envoy_api_field_resource.aliases>` set to the requested host
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it seems like it should set name but would not need to set aliases.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the virtual host cannot be resolved, you know an alias that that virtual host could go by, but you don't the name of that virtual host since there is no virtual host.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be no difference in content or semantics between the name and aliases fields -- if we didn't care about backward-compatibility, we could just change name to be a repeated field instead of adding the aliases field. But even though they're split, the set of all values in both fields should be treated as a single list: all names in the list should be unique for the resource type, and a query for any one of the names should return the same object.

In this case, there is exactly one name that the client will be looking for. So what's the value of putting that in the aliases field instead of in the name field? And if we do put it in the aliases field, what will we put into the name field instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every virtual host has a definitive name that populates the name field and aliases are other names that that resource can go by. I'm not sure that we want to mix the meanings of the names and aliases.

We also care about backwards compatibility of xDS, so I'm not sure we can change the API to combine names and aliases.

A resource can have any name that the management server wants to assign it and Envoy doesn't care. However, it does care about the contents of the alias field. In the case of a VHDS resource not being found, we know that the requested resource can go by a name matching /, but we don't know what name the management server assigned that resource since that resource could not be found.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every virtual host has a definitive name that populates the name field and aliases are other names that that resource can go by. I'm not sure that we want to mix the meanings of the names and aliases.

Why would the meanings be different? Are there any use-cases in which the client would care about the difference between them?

We also care about backwards compatibility of xDS, so I'm not sure we can change the API to combine names and aliases.

This PR is exposing the aliases fields in the Resource message, which was not previously exposed, so we can define its semantics to be anything we want. Why would this break backward compatibility any more than introducing the aliases field in the first place?

A resource can have any name that the management server wants to assign it and Envoy doesn't care. However, it does care about the contents of the alias field. In the case of a VHDS resource not being found, we know that the requested resource can go by a name matching /, but we don't know what name the management server assigned that resource since that resource could not be found.

Envoy may not care about the name, but it's not true that no client cares. The gRPC xDS client does in fact care about resource names; for example, in LDS and CDS requests, gRPC clients make non-wildcard requests, but for backward compatibility, it cannot assume that the server will honor the resource_names field in the request, so it looks for the specific resource name(s) that it asked for.

I think the right way to think about this case is that, because there is no match for the resource name that the client requested, the server is going to return the name that the client requested with no attached resource. This tells the client that the requested resource does not exist.

Copy link
Copy Markdown
Member Author

@brian-avery brian-avery Dec 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless, this is how it's implemented. Based on this conversation, it seems that @htuch @dmitri-d and myself are in agreement that this is good for now. Can we address this after this is merged in a separate from this PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, let's take #9317 and see where this leads us. I feel that without another on-demand protocol, we don't have much in the way of examples to illustrate the utility of a canonical name, we can see how this plays out in v2 xDS to feed into UDPA.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we can both accept #9317 and say that VHDS detects unknown virtual hosts based on the aliases field instead of the name field. This is basically a contradiction. It would mean that in practice, every management server would need to do something in violation of the spec.

I think we have two choices here:

  1. Fix VHDS to check the name field instead of aliases field, and update this PR accordingly.
  2. Change Document incremental xDS semantics about resources that do not exist. #9317 to say that clients need to be prepared to match unknown resources on both the name and aliases fields.

I would prefer option (1), since option (2) would impose additional requirements on all client implementations without actually adding any value.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is already implemented as described in this doc. 9317 is proposing to change that. Whether that's right or wrong, I'm not sure. However, what's documented here is current functionality and agreed upon by @htuch @dmitri-d and myself. I'm proposing pushing protocol and docs changes to the other PR and we can update if we add these changes if we need to.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems #9317 is a very recent PR and an attempt to change the requirements for work which has already been done and agreed to, this should ideally be handled through other PRs after this work is committed. IMHO this has been an enormous task and we need to draw a line under it so we can move forward with it being the basis for future changes.

Comment thread api/xds_protocol.rst Outdated

.. _on_demand_vhds_rds_protocol:

Virtual Host Discovery Service
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good to me, but I'll let @htuch make the final call on this.

entry and the resource unpopulated. This will allow Envoy to match the
requested resource to the response.

Updates to the route configuration entry to which a virtual host belongs will
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph should be updated based on what we agreed in the other thread:

  • VHDS subscriptions (and the corresponding locally cached resources) go away only when an RDS update changes the vhds field. Other RDS updates do not affect the VHDS data.
  • Any given virtual host must be sent either via RDS or via VHDS; the same host cannot be handled in both places. This means that if an RDS update adds a virtual host that was previously obtained via VHDS, the client should unsubscribe from that virtual host via VHDS.

@htuch htuch added the waiting label Dec 4, 2019
Signed-off-by: Brian Avery <bavery@redhat.com>
Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo the aliases and virtual host orthogonality threads (and nits)

Comment thread docs/build.sh Outdated
fi
# Check the version_history.rst contains current release version.
grep --fixed-strings "$VERSION_NUMBER" docs/root/intro/version_history.rst \
# Check the git tag matches the version number in the VERSION file.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the gratuitous reformat?

Comment thread docs/root/configuration/http/http_conn_man/rds.rst
Comment thread docs/root/configuration/http/http_conn_man/vhds.rst Outdated
Comment thread docs/root/configuration/http/http_conn_man/vhds.rst Outdated
Comment thread docs/root/configuration/http/http_conn_man/vhds.rst
Comment thread docs/root/configuration/http/http_conn_man/vhds.rst Outdated
Comment thread docs/root/configuration/http/http_conn_man/vhds.rst Outdated
Comment thread docs/root/configuration/http/http_conn_man/vhds.rst Outdated
Comment thread docs/root/configuration/http/http_conn_man/vhds.rst Outdated
Signed-off-by: Brian Avery <bavery@redhat.com>
Signed-off-by: Brian Avery <bavery@redhat.com>
Signed-off-by: Brian Avery <bavery@redhat.com>
Signed-off-by: Brian Avery <bavery@redhat.com>
htuch pushed a commit that referenced this pull request Dec 12, 2019
…#9317)

Document incremental xDS semantics about resources that do not exist.
Risk Level: Low
Testing: N/A
Docs Changes: Included in PR
Release Notes: N/A

This attempts to clarify the incremental xDS protocol semantics, as per discussion in #7415

Signed-off-by: Mark D. Roth <roth@google.com>
@htuch
Copy link
Copy Markdown
Member

htuch commented Dec 12, 2019

#9317 was merged earlier; this is a pretty reasonable way to handle missing resources. Can we update the implementation to match? This shouldn't be a huge change.

Signed-off-by: Brian Avery <bavery@redhat.com>
@markdroth
Copy link
Copy Markdown
Contributor

This looks great to me! Thanks for making all of those changes.

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Really happy to see this land, this is our first on-demand spec.

@htuch htuch merged commit 8ea6ccb into envoyproxy:master Dec 13, 2019
@mattklein123
Copy link
Copy Markdown
Member

Epic! Thank you every one for seeing this through!

prakhag1 pushed a commit to prakhag1/envoy that referenced this pull request Jan 3, 2020
…envoyproxy#9317)

Document incremental xDS semantics about resources that do not exist.
Risk Level: Low
Testing: N/A
Docs Changes: Included in PR
Release Notes: N/A

This attempts to clarify the incremental xDS protocol semantics, as per discussion in envoyproxy#7415

Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Prakhar <prakhar_au@yahoo.com>
prakhag1 pushed a commit to prakhag1/envoy that referenced this pull request Jan 3, 2020
 Adds documentation for on-demand VHDS/RDS.

Signed-off-by: Brian Avery <bavery@redhat.com>
Signed-off-by: Prakhar <prakhar_au@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no stalebot Disables stalebot from closing an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants