upstream: support SDS in HCS-built clusters#45351
Merged
mathetake merged 3 commits intoJun 11, 2026
Merged
Conversation
ProdClusterInfoFactory constructed TransportSocketFactoryContextImpl with the 3-arg ctor, leaving init_manager_ null. The SDS branch of getTlsCertificateConfigProviders (context_config_impl.cc:74) calls factory_context.initManager() unconditionally, so any HCS carrying tls_certificate_sds_secret_configs aborts the proxy in HdsCluster construction. Passing the server's init manager would also assert at runtime because HCS arrives long after the server has transitioned to Initialized. Mirror the per-cluster pattern used by ClusterImplBase for CDS clusters (upstream_impl.cc:1622): construct a fresh Init::ManagerImpl for each HCS-built cluster, set it on the factory_context, build the transport socket factory and matcher, then drive initialize() with a no-op watcher so the registered SDS subscriptions kick off their file watchers immediately. Signed-off-by: Takeshi Yoneda <tyoneda@netflix.com>
mathetake
force-pushed
the
fix-prod-cluster-info-factory-sds
branch
from
May 29, 2026 16:14
f757c95 to
02a6d90
Compare
mathetake
marked this pull request as ready for review
May 29, 2026 16:24
mathetake
commented
May 29, 2026
| params.server_context_, *scope, params.server_context_.messageValidationVisitor()); | ||
| factory_context.setInitManager(init_manager); | ||
|
|
||
| // TODO(JimmyCYJ): Support SDS for HDS cluster. |
Member
Author
There was a problem hiding this comment.
this PR is basically about resolving this TODO
Member
Author
|
/retest |
wbpcode
reviewed
Jun 11, 2026
| std::unique_ptr<ClusterInfoImpl>); | ||
|
|
||
| Init::WatcherImpl noop_watcher("HdsCluster cluster info", []() {}); | ||
| init_manager.initialize(noop_watcher); |
Member
There was a problem hiding this comment.
only one question, what will happens if the cluster cannot complete the initialization immediately (for example, , what will happens?
I checked the source code, the init manager is designed to be safe even the init manager is destroyed before the target or in reverse.
Member
|
/retest |
wbpcode
approved these changes
Jun 11, 2026
nezdolik
pushed a commit
to nezdolik/envoy
that referenced
this pull request
Jun 16, 2026
Commit Message: upstream: support SDS in HCS-built clusters Additional Description: ProdClusterInfoFactory constructed TransportSocketFactoryContextImpl with the 3-arg ctor, leaving init_manager_ null. The SDS branch of getTlsCertificateConfigProviders (context_config_impl.cc:74) calls factory_context.initManager() unconditionally, so any HCS carrying tls_certificate_sds_secret_configs aborts the proxy in HdsCluster construction. Passing the server's init manager would also assert at runtime because HCS arrives long after the server has transitioned to Initialized. Mirror the per-cluster pattern used by ClusterImplBase for CDS clusters (upstream_impl.cc:1622): construct a fresh Init::ManagerImpl for each HCS-built cluster, set it on the factory_context, build the transport socket factory and matcher, then drive initialize() with a no-op watcher so the registered SDS subscriptions kick off their file watchers immediately. Risk Level: mid (touches core) Testing: done Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Takeshi Yoneda <tyoneda@netflix.com>
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.
Commit Message: upstream: support SDS in HCS-built clusters
Additional Description:
ProdClusterInfoFactory constructed TransportSocketFactoryContextImpl with the 3-arg ctor, leaving init_manager_ null. The SDS branch of getTlsCertificateConfigProviders (context_config_impl.cc:74) calls factory_context.initManager() unconditionally, so any HCS carrying tls_certificate_sds_secret_configs aborts the proxy in HdsCluster construction. Passing the server's init manager would also assert at runtime because HCS arrives long after the server has transitioned to Initialized.
Mirror the per-cluster pattern used by ClusterImplBase for CDS clusters (upstream_impl.cc:1622): construct a fresh Init::ManagerImpl for each HCS-built cluster, set it on the factory_context, build the transport socket factory and matcher, then drive initialize() with a no-op watcher so the registered SDS subscriptions kick off their file watchers immediately.
Risk Level: mid (touches core)
Testing: done
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a