api: Add send_all_clusters field to LRS response.#10613
api: Add send_all_clusters field to LRS response.#10613htuch merged 15 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Mark D. Roth <roth@google.com>
htuch
left a comment
There was a problem hiding this comment.
Looks good, needs fix_format.
/wait
| // Not populated if send_all_clusters is true. | ||
| repeated string clusters = 1 [(validate.rules).repeated = {min_items: 1}]; | ||
| // If true, the client should send all clusters it knows about. | ||
| // The server may only specify this if the client advertises the |
There was a problem hiding this comment.
I think it's safe to set this regardless of the capability, you just might not get back the expected result.
There was a problem hiding this comment.
Reworded to indicate that clients will not honor the field unless they advertise that capability.
| // [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. | ||
| message LoadStatsResponse { | ||
| // Clusters to report stats for. | ||
| // Not populated if send_all_clusters is true. |
| :ref:`overprovisioning_factor<envoy_api_field_ClusterLoadAssignment.Policy.overprovisioning_factor>` | ||
| field. If graceful failover functionality is required, it must be supplied by the management | ||
| server. | ||
| - **envoy.lrs.supports_send_all_clusters**: This feature indicates that the client supports |
There was a problem hiding this comment.
Do you plan on implementing this in Envoy? It's not a ton of work.
There was a problem hiding this comment.
If it's something I can do fairly quickly, I can take a stab at it. Can you point me at the code that would need to be changed?
There was a problem hiding this comment.
It would mean changing the loop logic in https://github.com/envoyproxy/envoy/blob/master/source/common/upstream/load_stats_reporter.cc#L48, instead of looping over known clusters from LRS and looking them up in cluster manager, we would iterate over all the clusters in cluster manager in the wildcard case.
There was a problem hiding this comment.
Thanks for implementing; have you added the client feature capability announcement yet?
There was a problem hiding this comment.
Done. Also added a bullet to the release notes about this.
Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
|
I don't understand what's causing the docs CI failure. The ref I used looks like the right format -- in fact, it exactly matches the form used in a couple of places in load_report.proto itself. Is it possible that lrs.proto is simply not being loaded into RST when client_features.rst is being formatted? |
|
@markdroth yeah, https://www.envoyproxy.io/docs/envoy/latest/api-v2/service/load_stats/v2/lrs.proto is empty. This is due to a known issue, we don't have 1st class support for generating docs for service APIs, see #3091. I'd suggest just writing it out in natural language and leaving a |
Signed-off-by: Mark D. Roth <roth@google.com>
|
Please merge master to pick up #10672. We no longer accept changes to v2 (without explicit exception), so any API modifications should happen in v3. If this PR is adding a new proto, please follow the updated instructions in https://github.com/envoyproxy/envoy/blob/master/api/STYLE.md#adding-an-extension-configuration-to-the-api. |
Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
…ters Signed-off-by: Mark D. Roth <roth@google.com>
|
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! |
Signed-off-by: Mark D. Roth <roth@google.com>
|
@htuch I think everything is working here now, but the coverage CI is still failing. It's not obvious to me from the error message what the problem is. Can you please take a look and advise? Thanks! |
| // If true, the client should send all clusters it knows about. | ||
| // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their | ||
| // :ref:`client_features<envoy_api_field_core.Node.client_features>` field will honor this field. | ||
| bool send_all_clusters = 4; |
There was a problem hiding this comment.
I think this should be v3-only, but I imagine this is going to cause you folks pain? @envoyproxy/api-shepherds
There was a problem hiding this comment.
Yeah, unfortunately, this is something that we need in v2 for product reasons.
There was a problem hiding this comment.
I'm going to have to recuse myself and ask the other @envoyproxy/api-shepherds to weigh in on whether an exception can be made here.
There was a problem hiding this comment.
@lizan can we get your opinion on this one as well? Thanks.
| :ref:`overprovisioning_factor<envoy_api_field_ClusterLoadAssignment.Policy.overprovisioning_factor>` | ||
| field. If graceful failover functionality is required, it must be supplied by the management | ||
| server. | ||
| - **envoy.lrs.supports_send_all_clusters**: This feature indicates that the client supports |
There was a problem hiding this comment.
Thanks for implementing; have you added the client feature capability announcement yet?
|
@markdroth you might want to merge master before/after making the suggested changes above. Odds are CI will be fixed by then. |
…ters Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
mattklein123
left a comment
There was a problem hiding this comment.
Small API comment, thank you!
Signed-off-by: Mark D. Roth <roth@google.com>
htuch
left a comment
There was a problem hiding this comment.
LGTM modulo v2 modificaiton discussion.
|
@mattklein123 Any objections to making this change in v2 as well? gRPC is working on a design to migrate to v3, but we'll need this before we can make that happen. |
I'm OK with it. |
|
@lizan Can we get your approval on making this change in v2? Thanks! |
Signed-off-by: Mark D. Roth roth@google.com
Description: Add a
send_all_clustersfield to LRS response, triggered by a new client capability. This avoids the need for the server to enumerate the full list of clusters if it always wants data for all clusters.Risk Level: Low
Testing: N/A
Docs Changes: Included in PR.
Release Notes: N/A
As discussed with @htuch and @jaychenatr.