consul/agent/proxycfg-glue
Derek Menteer 04edace1de
Fix issue with streaming service health watches. (#17775)
Fix issue with streaming service health watches.

This commit fixes an issue where the health streams were unaware of service
export changes. Whenever an exported-services config entry is modified, it is
effectively an ACL change.

The bug would be triggered by the following situation:

- no services are exported
- an upstream watch to service X is spawned
- the streaming backend filters out data for service X (due to lack of exports)
- service X is finally exported

In the situation above, the streaming backend does not trigger a refresh of its
data.  This means that any events that were supposed to have been received prior
to the export are NOT backfilled, and the watches never see service X spawning.

We currently have decided to not trigger a stream refresh in this situation due
to the potential for a thundering herd effect (touching exports would cause a
re-fetch of all watches for that partition, potentially).  Therefore, a local
blocking-query approach was added by this commit for agentless.

It's also worth noting that the streaming subscription is currently bypassed
most of the time with agentful, because proxycfg has a `req.Source.Node != ""`
which prevents the `streamingEnabled` check from passing.  This means that while
agents should technically have this same issue, they don't experience it with
mesh health watches.

Note that this is a temporary fix that solves the issue for proxycfg, but not
service-discovery use cases.
2023-06-15 12:46:58 -05:00
..
config_entry.go JWT Authentication with service intentions: xds package update (#17414) 2023-05-19 18:14:16 -04:00
discovery_chain.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
discovery_chain_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
exported_peered_services.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
exported_peered_services_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
federation_state_list_mesh_gateways.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
federation_state_list_mesh_gateways_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
gateway_services.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
gateway_services_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
glue.go agent: remove agent cache dependency from service mesh leaf certificate management (#17075) 2023-06-13 10:54:45 -05:00
health.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
health_blocking.go Fix issue with streaming service health watches. (#17775) 2023-06-15 12:46:58 -05:00
health_blocking_test.go Fix issue with streaming service health watches. (#17775) 2023-06-15 12:46:58 -05:00
health_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
helpers_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intention_upstreams.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intention_upstreams_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intentions.go Add sameness groups to service intentions. (#17064) 2023-04-20 12:16:04 -04:00
intentions_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intentions_test.go Add sameness groups to service intentions. (#17064) 2023-04-20 12:16:04 -04:00
internal_service_dump.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
internal_service_dump_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
leafcerts.go agent: remove agent cache dependency from service mesh leaf certificate management (#17075) 2023-06-13 10:54:45 -05:00
peered_upstreams.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
peered_upstreams_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
peering_list.go [OSS] gRPC Blocking Queries (#17426) 2023-05-23 17:29:10 -04:00
peering_list_test.go [OSS] gRPC Blocking Queries (#17426) 2023-05-23 17:29:10 -04:00
resolved_service_config.go Use auth context when evaluating service read permissions (#17207) 2023-05-02 16:23:42 -04:00
resolved_service_config_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
service_http_checks.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
service_http_checks_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
service_list.go * added Sameness Group to proto files (#16998) 2023-04-14 09:24:46 -07:00
service_list_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
trust_bundle.go [OSS] gRPC Blocking Queries (#17426) 2023-05-23 17:29:10 -04:00
trust_bundle_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00