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

Backport of Fix up case where subscription is terminated due to ACLs changing or a snapshot restore occurring into release/1.15.x #17567

Conversation

hc-github-team-consul-core
Copy link
Contributor

@hc-github-team-consul-core hc-github-team-consul-core commented Jun 5, 2023

Backport

This PR is auto-generated from #17566 to be assessed for backporting due to the inclusion of the label backport/1.15.

The below text is copied from the body of the original PR.


Description

Due to swallowing and only logging xDS errors here:

if IsTerminalError(u.Err) {
s.logger.Error("Data source in an irrecoverable state; exiting", "error", u.Err, "correlationID", u.CorrelationID)
s.Close(true)
return
}
if err := s.handler.handleUpdate(ctx, u, snap); err != nil {
s.logger.Error("Failed to handle update from watch",
"id", u.CorrelationID, "error", err,
)
continue
}

We were getting into a state where if ACLs were modified while connected to xDS, the stream wasn't properly being re-established and instead the Consul logs were filling up with error logs such as:

Failed to handle update from watch: kind=api-gateway proxy=default/default/gateway-d6b4d69c-krz5b service_id=default/default/gateway-d6b4d69c-krz5b id=gateway-config error="error filling agent cache: subscription closed by server, client must reset state and resubscribe"

Basically we were missing some casing for marking certain errors as TerminalErrors in proxycfg-glue, this fixes that.

Testing & Reproduction steps

Get a proxy and/or gateway to connect up to xDS and then modify the token ACLs that are associated with it, you should see a bunch of these in the logs.

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/proxycfg-glue-subscription-fails/singularly-relaxed-pegasus branch from ddbd534 to 48389a8 Compare June 5, 2023 17:10
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/proxycfg-glue-subscription-fails/singularly-relaxed-pegasus branch from 5a2f7f7 to adad503 Compare June 5, 2023 17:10
Copy link

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@vercel vercel bot temporarily deployed to Preview – consul-ui-staging June 5, 2023 17:13 Inactive
@vercel vercel bot temporarily deployed to Preview – consul June 5, 2023 17:16 Inactive
@hc-github-team-consul-core hc-github-team-consul-core merged commit db58469 into release/1.15.x Jun 5, 2023
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/proxycfg-glue-subscription-fails/singularly-relaxed-pegasus branch June 5, 2023 17:32
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.

3 participants