Skip to content
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

xds-failover: disable moving to primary after fallback responds #36386

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adisuissa
Copy link
Contributor

Commit Message: xds-failover: disable moving to primary after fallback responds
Additional Description:
In #35591 Envoy's implementation was modified to allow Envoy move to the primary xDS source, even after the fallback successfully responded.
This PR adds a runtime guard that reverts this behavior. This will be a temporary runtime guard that is introduced to allow testing of the new feature and will be later removed.
Note that there's no change to the current Envoy behavior, unless the runtime guard envoy.reloadable_features.xds_failover_to_primary_enabled is explicitly set to false.

Risk Level: low - behind a runtime guard.
Testing: Added unit and integration tests.
Docs Changes: N/A
Release Notes: Added an entry.
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.xds_failover_to_primary_enabled was introduced that is set to true by default, and keeps the current behavior.

Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #36386 was opened by adisuissa.

see: more, trace.

Copy link

CC @envoyproxy/runtime-guard-changes: FYI only for changes made to (source/common/runtime/runtime_features.cc).

🐱

Caused by: #36386 was opened by adisuissa.

see: more, trace.

@adisuissa adisuissa marked this pull request as ready for review October 1, 2024 20:20
@adisuissa
Copy link
Contributor Author

Assigning @nezdolik for a domain expert review.
/assign @nezdolik

@@ -112,6 +112,11 @@ minor_behavior_changes:
- area: tracers
change: |
Set status code based on GRPC status code for OpenTelemetry tracers (previously unset).
- area: xds-failover
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was first confused why do we need this temp feature until reading the PR description.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it is worth mentioning in release notes that this is a test feature

test_server_->waitForGaugeEq("cluster_manager.warming_clusters", 0);
test_server_->waitForGaugeGe("cluster_manager.active_clusters", 2);
test_server_->waitForGaugeEq("cluster.failover_cluster_0.warming_state", 0);
EXPECT_EQ(2, test_server_->gauge("control_plane.connected_state")->value());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was always thinking that this stat can only have either 0 or 1 value.

// Immediately fail the connection.
failover_xds_stream_->finishGrpcStream(Grpc::Status::Internal);

// Ensure that Envoy still attempts to connect to the primary,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aren't we are ensuring that primary connection is not attempted? (since envoy.reloadable_features.xds_failover_to_primary_enabled is set to false and we have previously successfully connected to failover)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants