Skip to content

[1.14.x] Allow dialer to re-establish terminated peering#16867

Merged
freddygv merged 1 commit into
release/1.14.xfrom
1.14/repeer-terminated
Apr 3, 2023
Merged

[1.14.x] Allow dialer to re-establish terminated peering#16867
freddygv merged 1 commit into
release/1.14.xfrom
1.14/repeer-terminated

Conversation

@freddygv
Copy link
Copy Markdown
Contributor

@freddygv freddygv commented Apr 3, 2023

Backport to 1.14 of #16776 so that peerings can be more easily repaired across HCP-supported versions.

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.

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 "<<<ID>>>""

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.
@freddygv freddygv requested review from a team, malizz and zalimeni and removed request for a team April 3, 2023 22:58
@freddygv freddygv merged commit 604cad0 into release/1.14.x Apr 3, 2023
@freddygv freddygv deleted the 1.14/repeer-terminated branch April 3, 2023 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants