open-consul/agent
hc-github-team-consul-core 48b9a0ff8c
Backport of Fix xDS missing endpoint race condition. into release/1.16.x (#19873)
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:16:43 -06:00
..
ae copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
auto-config [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
blockingquery [OSS] gRPC Blocking Queries (#17426) 2023-05-23 17:29:10 -04:00
cache Revert "cache: refactor agent cache fetching to prevent unnecessary f… (#16818) (#17046) 2023-04-19 13:17:21 -05:00
cache-types Backport of agent: remove agent cache dependency from service mesh leaf certificate management into release/1.16.x (#17704) 2023-06-13 16:12:43 +00:00
checks Manual Backport of Add TCP+TLS Healthchecks into release/1.16.x (#18678) 2023-09-05 14:13:59 -07:00
config Backport of Add grpc keepalive configuration into release/1.16.x (#19339) (#19346) 2023-10-24 08:52:05 -05:00
configentry backport of commit fe5c145cddd89da804d0de7d19bdc5d0d276df3b (#18010) 2023-07-05 14:50:59 +00:00
connect [1.16.x] Vault CA bugfixes (#19285) (#19336) 2023-10-23 14:14:05 +00:00
consul [Backport 1.16.x] Add CE version of Gateway Upstream Disambiguation (#19867) 2023-12-08 11:46:23 -05:00
debug copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
dns copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
envoyextensions backport of commit c0afba3a0c2ae093fee756a9019d49db25367d69 (#17975) 2023-06-30 14:20:50 +00:00
exec copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
grpc-external Backport of Add grpc keepalive configuration into release/1.16.x (#19339) (#19346) 2023-10-24 08:52:05 -05:00
grpc-internal Backport of bump testcontainers-go to 0.22.0 into release/1.16.x (#18417) 2023-08-09 13:04:32 -04:00
grpc-middleware Manual Backport of [Cloud][CC-6925] Updates to pushing server state into release/1.16.x (#19818) 2023-12-06 13:35:03 -05:00
hcp Manual Backport of [Cloud][CC-6925] Updates to pushing server state into release/1.16.x (#19818) 2023-12-06 13:35:03 -05:00
leafcert Backport of agent: remove agent cache dependency from service mesh leaf certificate management into release/1.16.x (#17704) 2023-06-13 16:12:43 +00:00
local Backport of bug: prevent go routine leakage due to existing DeferCheck into release/1.16.x (#18565) 2023-08-23 15:04:19 +00:00
log-drop copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
metadata add necessary plumbing to implement per server ip based rate limiting (#17436) 2023-05-23 15:37:01 -04:00
metrics copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
mock copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
pool Backport of [NET-6459] Fix issue with wanfed lan ip conflicts. into release/1.16.x (#19522) 2023-11-06 15:14:59 +00:00
proxycfg Backport of parse config protocol on write to optimize disco-chain compilation into release/1.16.x (#19858) 2023-12-07 15:37:52 -05:00
proxycfg-glue Backport of Add extra logging for mesh health endpoints. into release/1.16.x (#18648) 2023-09-01 17:44:37 +00:00
proxycfg-sources copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
router copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
routine-leak-checker copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
rpc Backport of Add grpc keepalive configuration into release/1.16.x (#19339) (#19346) 2023-10-24 08:52:05 -05:00
rpcclient [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
structs Backport of parse config protocol on write to optimize disco-chain compilation into release/1.16.x (#19858) 2023-12-07 15:37:52 -05:00
submatview * added Sameness Group to proto files (#16998) 2023-04-14 09:24:46 -07:00
systemd copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
token [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
uiserver [NET-5688] APIGateway UI Topology Fixes (#19657) Backport (#19763) 2023-11-29 11:22:56 -05:00
xds Backport of Fix xDS missing endpoint race condition. into release/1.16.x (#19873) 2023-12-08 12:16:43 -06:00
acl.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_ce.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
acl_endpoint.go [NET-5399] Add support for querying tokens by service name. (#18689) 2023-09-06 13:16:27 -05:00
acl_endpoint_test.go [NET-5399] Add support for querying tokens by service name. (#18689) 2023-09-06 13:16:27 -05:00
acl_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
agent.go Backport of Add grpc keepalive configuration into release/1.16.x (#19339) (#19346) 2023-10-24 08:52:05 -05:00
agent_ce.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
agent_ce_test.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
agent_endpoint.go Backport of member cli: add -filter expression to flags into release/1.16.x (#18276) 2023-07-25 14:57:08 -04:00
agent_endpoint_ce.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
agent_endpoint_ce_test.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
agent_endpoint_test.go Backport of Remove flaky test assertions into release/1.16.x (#18871) 2023-09-18 23:10:50 +00:00
agent_test.go Manual Backport of Add TCP+TLS Healthchecks into release/1.16.x (#18678) 2023-09-05 14:13:59 -07:00
apiserver.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
apiserver_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_endpoint.go Add /v1/internal/service-virtual-ip for manually setting service VIPs (#17294) 2023-05-12 00:38:52 +00:00
catalog_endpoint_ce.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
catalog_endpoint_test.go Add /v1/internal/service-virtual-ip for manually setting service VIPs (#17294) 2023-05-12 00:38:52 +00:00
check.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
connect_auth.go Add sameness groups to service intentions. (#17064) 2023-04-20 12:16:04 -04:00
connect_ca_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
connect_ca_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
coordinate_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
coordinate_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
delegate_mock_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
denylist.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
denylist_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
discovery_chain_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
discovery_chain_endpoint_test.go Attach service virtual IP info to compiled discovery chain (#17295) 2023-05-12 02:28:16 +00:00
dns.go Fix a bug that wrongly trims domains when there is an overlap with DC 1.16.x (#18164) 2023-07-18 10:03:41 -04:00
dns_ce.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
dns_ce_test.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
dns_test.go Fix a bug that wrongly trims domains when there is an overlap with DC 1.16.x (#18164) 2023-07-18 10:03:41 -04:00
enterprise_delegate_ce.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
event_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
event_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
federation_state_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
health_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
health_endpoint_test.go Backport of Remove flaky test assertions into release/1.16.x (#18871) 2023-09-18 23:10:50 +00:00
http.go Backport of feature - [NET - 4005] - [Supportability] Reloadable Configuration - enable_debug into release/1.16.x (#17969) 2023-06-30 18:40:20 +05:30
http_ce.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
http_ce_test.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
http_decode_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
http_register.go Add version endpoint (#17506) 2023-05-30 17:25:48 -05:00
http_test.go Backport of feature - [NET - 4005] - [Supportability] Reloadable Configuration - enable_debug into release/1.16.x (#17969) 2023-06-30 18:40:20 +05:30
intentions_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intentions_endpoint_ce_test.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
intentions_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
keyring.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
keyring_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
kvs_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
kvs_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
metrics.go log warning about certificate expiring sooner and with more details 2023-04-07 20:38:07 +00:00
metrics_test.go Backport of Fix more test flakes into release/1.16.x (#19545) 2023-11-07 10:46:58 -06:00
nodeid.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
nodeid_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
notify.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
notify_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
operator_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
operator_endpoint_ce.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
operator_endpoint_ce_test.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
operator_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
peering_endpoint.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
peering_endpoint_ce_test.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
peering_endpoint_test.go [OSS] gRPC Blocking Queries (#17426) 2023-05-23 17:29:10 -04:00
prepared_query_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
prepared_query_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
proxycfg_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
reload.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
remote_exec.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
remote_exec_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
retry_join.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
retry_join_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
service_checks_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
service_manager.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
service_manager_test.go Remove deprecated service-defaults upstream behavior. (#16957) 2023-04-11 10:20:33 -05:00
session_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
session_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
setup.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
setup_ce.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
sidecar_service.go Backport of [NET-5217] [OSS] Derive sidecar proxy locality from parent service into release/1.16.x (#18438) 2023-08-10 18:47:38 +00:00
sidecar_service_test.go Backport of [NET-5217] [OSS] Derive sidecar proxy locality from parent service into release/1.16.x (#18438) 2023-08-10 18:47:38 +00:00
signal_unix.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
signal_windows.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
snapshot_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
snapshot_endpoint_test.go Backport of Fix more test flakes into release/1.16.x (#19545) 2023-11-07 10:46:58 -06:00
status_endpoint.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
status_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
streaming_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
testagent.go Revert "cache: refactor agent cache fetching to prevent unnecessary f… (#16818) (#17046) 2023-04-19 13:17:21 -05:00
testagent_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
translate_addr.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
txn_endpoint.go Manual Backport of Add TCP+TLS Healthchecks into release/1.16.x (#18678) 2023-09-05 14:13:59 -07:00
txn_endpoint_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
ui_endpoint.go [NET-5688] APIGateway UI Topology Fixes (#19657) Backport (#19763) 2023-11-29 11:22:56 -05:00
ui_endpoint_ce_test.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
ui_endpoint_test.go [BACKPORT] 1.16.x manual backport of OSS->CE branch (#18549) 2023-08-23 11:53:44 -05:00
user_event.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
user_event_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
util.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
util_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
watch_handler.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
watch_handler_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00