consul/agent/xds
hc-github-team-consul-core 4c0f70e80c
Backport of Fix xDS missing endpoint race condition. into release/1.15.x (#19872)
Fix xDS missing endpoint race condition.

This fixes the following race condition:
- Send update endpoints
- Send update cluster
- Recv ACK endpoints
- Recv ACK cluster

Prior to this fix, it would have resulted in the endpoints NOT existing in
Envoy. This occurred because the cluster update implicitly clears the endpoints
in Envoy, but we would never re-send the endpoint data to compensate for the
loss, because we would incorrectly ACK the invalid old endpoint hash. Since the
endpoint's hash did not actually change, they would not be resent.

The fix for this is to effectively clear out the invalid pending ACKs for child
resources whenever the parent changes. This ensures that we do not store the
child's hash as accepted when the race occurs.

An escape-hatch environment variable `XDS_PROTOCOL_LEGACY_CHILD_RESEND` was
added so that users can revert back to the old legacy behavior in the event
that this produces unknown side-effects.

This bug report and fix was mostly implemented by @ksmiley with some minor
tweaks.

Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
Co-authored-by: Keith Smiley <ksmiley@salesforce.com>
2023-12-08 12:40:51 -06:00
..
accesslogs [OSS] feat: access logs for listeners and listener filters (#15864) 2022-12-22 15:18:15 -05:00
extensionruntime [BACKPORT] 1.15.x manual backport of OSS->CE branch (#18552) 2023-08-23 11:55:18 -05:00
testcommon Backport of Inline API Gateway TLS cert code into release/1.15.x (#16306) 2023-02-17 14:46:49 -05:00
testdata Backport of Use strict DNS for mesh gateways with hostnames into release/1.15.x (#19394) 2023-10-27 12:29:50 -04:00
validateupstream-test Backport of Refactor xDS tests into release/1.15.x (#16741) 2023-03-22 20:51:58 +00:00
clusters.go Backport of Use strict DNS for mesh gateways with hostnames into release/1.15.x (#19394) 2023-10-27 12:29:50 -04:00
clusters_test.go backport PR 15979 to 1.15.x (#17208) 2023-05-09 17:25:50 -07:00
config.go backport PR 15979 to 1.15.x (#17208) 2023-05-09 17:25:50 -07:00
config_test.go Add support for configuring Envoys route idle_timeout (#14340) 2022-11-29 17:43:15 -05:00
delta.go Backport of Fix xDS missing endpoint race condition. into release/1.15.x (#19872) 2023-12-08 12:40:51 -06:00
delta_envoy_extender_ce_test.go [BACKPORT] 1.15.x manual backport of OSS->CE branch (#18552) 2023-08-23 11:55:18 -05:00
delta_test.go Backport of Fix xDS missing endpoint race condition. into release/1.15.x (#19872) 2023-12-08 12:40:51 -06:00
endpoints.go Backport of Fix mesh gateways incorrectly matching peer locality. into release/1.15.x (#16287) 2023-02-16 15:51:57 +00:00
endpoints_test.go Backport of Refactor xDS tests into release/1.15.x (#16741) 2023-03-22 20:51:58 +00:00
failover_math.go xds: default to speaking xDS v3, but allow for v2 to be spoken upon request (#9658) 2021-02-26 16:23:15 -06:00
failover_math_test.go Cluster peering failover disco chain changes (#14296) 2022-08-23 09:13:43 -04:00
golden_test.go Backport of Refactor xDS tests into release/1.15.x (#16741) 2023-03-22 20:51:58 +00:00
listeners.go Backport of Allow connections through Terminating Gateways from peered clusters NET-3463 into release/1.15.x (#19091) 2023-10-05 22:24:25 +00:00
listeners_ingress.go [BACKPORT] 1.15.x manual backport of OSS->CE branch (#18552) 2023-08-23 11:55:18 -05:00
listeners_test.go Backport of parse config protocol on write to optimize disco-chain compilation into release/1.15.x (#19857) 2023-12-07 16:11:58 -05:00
naming.go connect: generate the full SNI names for discovery targets in the compiler rather than in the xds package (#6340) 2019-08-19 13:03:03 -05:00
net_fallback.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
net_linux.go re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
protocol_trace.go Protobuf Modernization (#15949) 2023-01-11 09:39:10 -05:00
rbac.go Add the Lua Envoy extension (#15906) 2023-01-06 12:13:40 -05:00
rbac_test.go Add the Lua Envoy extension (#15906) 2023-01-06 12:13:40 -05:00
resources.go Backport of Inline API Gateway TLS cert code into release/1.15.x (#16306) 2023-02-17 14:46:49 -05:00
resources_ce_test.go [BACKPORT] 1.15.x manual backport of OSS->CE branch (#18552) 2023-08-23 11:55:18 -05:00
resources_test.go Manual backport 1.15.x of Avoid panic applying TProxy Envoy extensions (#17539) 2023-06-01 13:09:15 -04:00
response.go Protobuf Modernization (#15949) 2023-01-11 09:39:10 -05:00
routes.go NET-2904 Fixes API Gateway Route Service Weight Division Error (#16540) 2023-03-06 10:11:27 -05:00
routes_test.go Backport of Refactor xDS tests into release/1.15.x (#16741) 2023-03-22 20:51:58 +00:00
secrets.go Backport of Inline API Gateway TLS cert code into release/1.15.x (#16306) 2023-02-17 14:46:49 -05:00
server.go Implement APIGateway proxycfg snapshot (#16194) 2023-02-08 15:52:12 -06:00
server_ce.go [BACKPORT] 1.15.x manual backport of OSS->CE branch (#18552) 2023-08-23 11:55:18 -05:00
testing.go Backport of Fix panicky xDS test flakes into release/1.15.x (#16310) 2023-02-17 19:24:01 +00:00
xds.go Remove unused customEDSClusterJSON 2020-03-27 15:38:16 -04:00
xds_protocol_helpers_test.go Backport of Explicitly enable WebSocket upgrades into release/1.15.x (#18210) 2023-07-20 14:57:48 -07:00
z_xds_packages.go Backport of [NET-6138] security: Bump google.golang.org/grpc to 1.56.3 (CVE-2023-44487) to release/1.15.x (#19421) 2023-10-30 10:51:34 -04:00
z_xds_packages_test.go Protobuf Modernization (#15949) 2023-01-11 09:39:10 -05:00