wireguard: T5707: remove previously deconfigured peer #2431
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
Changing the public key of a peer (updating the key material) left the old WireGuard peer in place, as the key removal command used the new key.
WireGuard only supports peer removal based on the configured public-key, by deleting the entire interface this is the shortcut instead of parsing out all peers and removing them one by one.
Peer reconfiguration will always come with a short downtime while the WireGuard interface is recreated.
Types of changes
Related Task(s)
Related PR(s)
Component(s) name
WireGuard
Proposed changes
How to test
Added a new smoketest
test_05_wireguard_peer_pubkey_change
Or use:
Now use
sudo wg show wg1337
to compare the public keysNow change the public key and compare again
Smoketest result
Checklist: