xds: Move backend service label plumbing to CDS#12882
Open
becomeStar wants to merge 1 commit into
Open
Conversation
A75 changed aggregate cluster handling so aggregate clusters are represented as priority children whose children are CDS policies. In that structure, A89 expects backend service metric plumbing to go through CDS instead of xds_cluster_impl. Set NameResolver.ATTR_BACKEND_SERVICE from CdsLoadBalancer2 for non-aggregate leaf clusters so WRR metrics can read the backend service. Also add the grpc.lb.backend_service pick details label from the leaf CDS picker wrapper. Do not add the aggregate root cluster as backend_service. Remove the old backend_service attribute and pick details label handling from ClusterImplLoadBalancer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #12431.
This moves backend service metric label plumbing from
xds_cluster_impltocds, matching the A75/A89 aggregate cluster behavior.Previously,
xds_cluster_impladded thegrpc.lb.backend_servicepick-details label and propagatedNameResolver.ATTR_BACKEND_SERVICEto its child policy. That works for simple clusters, but it is the wrong layer after A75 because aggregate clusters need the leaf CDS cluster name, not the aggregate root cluster name.This change makes CDS responsible for backend service plumbing:
grpc.lb.backend_servicepick-details label using the CDS cluster nameNameResolver.ATTR_BACKEND_SERVICEto its child policy, so WRR can consume the backend service contextxds_cluster_implno longer owns backend service pick-details label or child attribute propagationThe existing
InternalEquivalentAddressGroup.ATTR_BACKEND_SERVICEpath is left unchanged for endpoint/subchannel metrics.Tests cover:
NameResolver.ATTR_BACKEND_SERVICEgrpc.lb.backend_servicexds_cluster_implno longer adding backend service labels or attributesPickDetailsConsumer, matching the realPickSubchannelArgscontract