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 Allow dialer to re-establish terminated peering into release/1.15.x #16859

Conversation

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

Backport

This PR is auto-generated from #16776 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

Currently, if an acceptor peer deletes a peering the dialer's peering will eventually get to a "terminated" state. If the two clusters need to be re-peered the acceptor will re-generate the token but the dialer will encounter this error on the call to establish:

failed to get addresses to dial peer: failed to refresh peer server addresses, will continue to use initial addresses: there is no active peering for "<<>>"

This is because in exchangeSecret().GetDialAddresses() we will get an error if fetching addresses for an inactive peering. The peering shows up as inactive at this point because of the existing terminated state.

Rather than checking whether a peering is active we can instead check whether it was deleted. This way users do not need to delete terminated peerings in the dialing cluster before re-establishing them.

Testing & Reproduction steps

  • The TestLeader_PeeringSync_Lifecycle_ServerDeletion test updated below shows how to reproduce the issue. It fails without this update.

PR Checklist

  • updated test coverage
  • external facing docs updated
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/peering/re-establish-terminated/humbly-hardy-mole branch from 3825697 to 118ef79 Compare April 3, 2023 18:08
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/peering/re-establish-terminated/humbly-hardy-mole branch from aff9c57 to 3d83a92 Compare April 3, 2023 18:08
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

@hc-github-team-consul-core hc-github-team-consul-core merged commit 1469efe into release/1.15.x Apr 3, 2023
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/peering/re-establish-terminated/humbly-hardy-mole branch April 3, 2023 18:28
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