-
Notifications
You must be signed in to change notification settings - Fork 5.3k
cluster manager: avoid immediate activation for dynamic inserted cluster when initialize #12783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b882bde
7e9332d
8e99e81
06aa174
a543ab1
65c633a
b4f730d
6cc9702
dcb77c1
67ecced
897a052
cb14efc
8b3ca5a
89ef612
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1132,6 +1132,26 @@ class AdsClusterV3Test : public AdsIntegrationTest { | |
| INSTANTIATE_TEST_SUITE_P(IpVersionsClientTypeDelta, AdsClusterV3Test, | ||
| DELTA_SOTW_GRPC_CLIENT_INTEGRATION_PARAMS); | ||
|
|
||
| TEST_P(AdsClusterV3Test, BasicClusterInitialWarming) { | ||
| initialize(); | ||
| const auto cds_type_url = Config::getTypeUrl<envoy::config::cluster::v3::Cluster>( | ||
| envoy::config::core::v3::ApiVersion::V3); | ||
| const auto eds_type_url = Config::getTypeUrl<envoy::config::endpoint::v3::ClusterLoadAssignment>( | ||
| envoy::config::core::v3::ApiVersion::V3); | ||
|
|
||
| EXPECT_TRUE(compareDiscoveryRequest(cds_type_url, "", {}, {}, {}, true)); | ||
| sendDiscoveryResponse<envoy::config::cluster::v3::Cluster>( | ||
| cds_type_url, {buildCluster("cluster_0")}, {buildCluster("cluster_0")}, {}, "1", false); | ||
| test_server_->waitForGaugeEq("cluster_manager.warming_clusters", 1); | ||
| EXPECT_TRUE(compareDiscoveryRequest(eds_type_url, "", {"cluster_0"}, {"cluster_0"}, {})); | ||
| sendDiscoveryResponse<envoy::config::endpoint::v3::ClusterLoadAssignment>( | ||
| eds_type_url, {buildClusterLoadAssignment("cluster_0")}, | ||
| {buildClusterLoadAssignment("cluster_0")}, {}, "1", false); | ||
|
|
||
| test_server_->waitForGaugeEq("cluster_manager.warming_clusters", 0); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not a great test since you can't actually tell that the cluster was ever warming. Can you check that it's warming (don't respond to EDS), and then response to EDS and make sure it's active?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. like this?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not quite. Verify that the warming gauge is 1 before you send the EDS response. /wait
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done. |
||
| test_server_->waitForGaugeGe("cluster_manager.active_clusters", 2); | ||
| } | ||
|
|
||
| // Verify CDS is paused during cluster warming. | ||
| TEST_P(AdsClusterV3Test, CdsPausedDuringWarming) { | ||
| initialize(); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.