wireguard: cleanup cilium_calls map upon downgrading from v1.18#38595
Merged
julianwiedmann merged 1 commit intov1.17from Apr 2, 2025
Merged
wireguard: cleanup cilium_calls map upon downgrading from v1.18#38595julianwiedmann merged 1 commit intov1.17from
julianwiedmann merged 1 commit intov1.17from
Conversation
4 tasks
Contributor
Author
|
/test |
8828f07 to
188bd9a
Compare
This patch introduces the logic to remove the cilium_calls map from v1.18 after a succesfull downgrade to v1.17. In v1.18, we're renaming this calls map to account for the ifindex name rather than using ReservedIdentityWorld. This means that the name is not `cilium_calls_wireguard_2` anymore, but `cilium_calls_wireguard_<ifindex>`. During downgrade, three different scenarios have been identified: 1. WG is being disabled: the interface would not exist anymore. We are not handling the calls_map removal use case when wireguard/overlay is not needed anymore after a Cilium patch/upgrade/downgrade, therefore we do not consider this scenario here either. 2. WG enabled, but ingress hook not needed: in this case, the `replaceWireguardDatapath()` function will account for the removal of this dangling calls map right after detaching any previous program that was referencing it. 3. WG enabled and ingress hook still required: `attachNetworkDevices()` will account also for removing this calls map as soon as it replaces the ingress program with the old cil_from_netdev. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
188bd9a to
07b6c69
Compare
Contributor
Author
|
/test |
christarazi
approved these changes
Apr 1, 2025
rgo3
approved these changes
Apr 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This patch is needed by #38077, where we are forced to rename the
cilium_calls_wireguard_map to preventMissingTailCallwhen downgrading from v1.18 to v1.17.In that case, the program detach logic would smoothly work, but as soon as the Wireguard program in v1.17 (only to-wireguard) is recompiled and the loader invokes
commit(), the tail call map is being completely overwritten. However, there would still be the from-wireguard program from v1.18 attached to the ingress, and it would lose the reference to those tail calls.For further details, please refer to the commit message.