cluster manager: support dynamic add/remove#323
Merged
mattklein123 merged 4 commits intomasterfrom Jan 6, 2017
Merged
Conversation
This is all of the plumbing required to support the CDS API. I will do the actual polling API in a follow up as this change is large enough as it is (it's also missing stats and some debug logging which I will also do in a follow up). What this change does: 1) Add 2 new CM APIs which allow clusters to be added and removed at runtime. 2) Changes the ownership logic of clusters such that primary clusters are now a unique_ptr and are inline destroyed on the main thread. Workers only have access to the backing shared ClusterInfo. 3) Fixes DNS so that requests can be cancelled and correctly implements cancel in the relevant cluster destructors. 4) Most of this change is actually a refactor so that the CM only interacts with the cluster interface. Otherwise testing all of the required scenarios is too complicated. With the refactor done it's much easier to test all of the different scenarios. This required generalizing a few things about how we were initializing SDS clusters. A few notes about this implementation: 1) Dynamic clusters are immediately added, without any initialize phase. This means that there will be a period of fetching/HC for dynamic clusters depending on the configuration. 2) There are no integration tests. We should add those in the future.
Member
Author
|
@lyft/network-team |
ccaraman
reviewed
Jan 6, 2017
|
|
||
| /** | ||
| * @return std::unordered_map<std::string, ConstClusterPtr> all current clusters. These are are | ||
| * the primary (not thread local) clusters so should just be used for stats/admin. |
ccaraman
reviewed
Jan 6, 2017
| /** | ||
| * @return std::unordered_map<std::string, ConstClusterPtr> all current clusters. These are are | ||
| * the primary (not thread local) clusters so should just be used for stats/admin. | ||
| * @return ClusterInfoMap all current clusters. These are are the primary (not thread local) |
ccaraman
reviewed
Jan 6, 2017
| class ClusterManagerFactory { | ||
| public: | ||
| virtual ~ClusterManagerFactory() {} | ||
|
|
Contributor
There was a problem hiding this comment.
comments for both of the methods.
ccaraman
reviewed
Jan 6, 2017
|
|
||
| cluster_manager.thread_local_clusters_[new_cluster->name()].reset( | ||
| new ThreadLocalClusterManagerImpl::ClusterEntry(cluster_manager, new_cluster)); | ||
|
|
ccaraman
reviewed
Jan 6, 2017
| initialized_callback_(); | ||
| } | ||
| } else if (pending_cluster_init_ == secondary_init_clusters_.size()) { | ||
| // All other clusters have initialized. Now we start up the SDS clusters since they will |
Contributor
There was a problem hiding this comment.
update comment to not refer to SDS clusters.
ccaraman
approved these changes
Jan 6, 2017
rshriram
pushed a commit
to rshriram/envoy
that referenced
this pull request
Oct 30, 2018
Automatic merge from submit-queue. [DO NOT MERGE] Auto PR to update dependencies of mixerclient This PR will be merged automatically once checks are successful. ```release-note none ```
yxue
pushed a commit
to yxue/envoy
that referenced
this pull request
Dec 3, 2019
Signed-off-by: Yaroslav Skopets <y.skopets@gmail.com>
lambdai
pushed a commit
to lambdai/envoy-dai
that referenced
this pull request
Jul 21, 2021
…y#62) (envoyproxy#323) Co-authored-by: John Howard <howardjohn@google.com>
jpsim
pushed a commit
that referenced
this pull request
Nov 28, 2022
Prevents warnings when building: ``` WARNING: CONFIGURATION: bazel-out/android-x86-fastbuild/bin/examples/kotlin/shared/hello_envoy_shared_lib_base_processed_manifest/AndroidManifest.xml has no minSdkVersion. Using 1. [204 / 242] Merging Android resources for @androidsdk//com.android.support:support-vector-drawable-25.0.0; 1s local ... (4 actions running) INFO: From Validating Android resources for //dist:envoy_mobile_android: Aug 12, 2019 10:21:21 PM com.google.devtools.build.android.AndroidManifest parseFrom WARNING: CONFIGURATION: bazel-out/android-x86-fastbuild/bin/dist/envoy_mobile_android_processed_manifest/AndroidManifest.xml has no minSdkVersion. Using 1. ``` Signed-off-by: Michael Rebello <me@michaelrebello.com> Signed-off-by: JP Simard <jp@jpsim.com>
jpsim
pushed a commit
that referenced
this pull request
Nov 29, 2022
Prevents warnings when building: ``` WARNING: CONFIGURATION: bazel-out/android-x86-fastbuild/bin/examples/kotlin/shared/hello_envoy_shared_lib_base_processed_manifest/AndroidManifest.xml has no minSdkVersion. Using 1. [204 / 242] Merging Android resources for @androidsdk//com.android.support:support-vector-drawable-25.0.0; 1s local ... (4 actions running) INFO: From Validating Android resources for //dist:envoy_mobile_android: Aug 12, 2019 10:21:21 PM com.google.devtools.build.android.AndroidManifest parseFrom WARNING: CONFIGURATION: bazel-out/android-x86-fastbuild/bin/dist/envoy_mobile_android_processed_manifest/AndroidManifest.xml has no minSdkVersion. Using 1. ``` Signed-off-by: Michael Rebello <me@michaelrebello.com> Signed-off-by: JP Simard <jp@jpsim.com>
mathetake
pushed a commit
that referenced
this pull request
Mar 3, 2026
**Commit Message** Add helm install. **Related Issues/PRs (if applicable)** Fixes #302 --------- Signed-off-by: Loong <long0dai@foxmail.com>
mathetake
added a commit
that referenced
this pull request
Mar 3, 2026
**Commit Message** Since #323, helm is no longer needed to be locally installed. Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.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.
This is all of the plumbing required to support the CDS API. I will do the
actual polling API in a follow up as this change is large enough as it is
(it's also missing stats and some debug logging which I will also do in a follow
up).
What this change does:
a unique_ptr and are inline destroyed on the main thread. Workers only have
access to the backing shared ClusterInfo.
in the relevant cluster destructors.
the cluster interface. Otherwise testing all of the required scenarios is
too complicated. With the refactor done it's much easier to test all of the
different scenarios. This required generalizing a few things about how we
were initializing SDS clusters.
A few notes about this implementation:
that there will be a period of fetching/HC for dynamic clusters depending on the
configuration.