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

ipsec: Don't attempt per-node route deletion when unexistant #26093

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

pchaigno
Copy link
Member

@pchaigno pchaigno commented Jun 9, 2023

Commit 3e59b68 ("ipsec: Per-node XFRM states & policies for EKS & AKS") changed the XFRM config to have one state and policy per remote node in IPAM modes ENI and Azure. The IPsec cleanup logic was therefore also updated to call deleteIPsec() whenever a remote node is deleted.

However, we missed that the cleanup logic also tries to remove the per-node IP route. In case of IPAM modes ENI and Azure, the IP route however stays as before: we have a single route for all remote nodes. We therefore don't have anything to cleanup.

Because of this unnecessary IP route cleanup attempt, an error message was printed for every remote node deletion:

Unable to delete the IPsec route OUT from the host routing table

This commit fixes it to avoid attempting this unnecessary cleanup.

Fixes: #24030.

Fix false error log message when IPsec is enabled with IPAM modes ENI or Azure and a remote node is deleted.

Commit 3e59b68 ("ipsec: Per-node XFRM states & policies for EKS &
AKS") changed the XFRM config to have one state and policy per remote
node in IPAM modes ENI and Azure. The IPsec cleanup logic was therefore
also updated to call deleteIPsec() whenever a remote node is deleted.

However, we missed that the cleanup logic also tries to remove the
per-node IP route. In case of IPAM modes ENI and Azure, the IP route
however stays as before: we have a single route for all remote nodes. We
therefore don't have anything to cleanup.

Because of this unnecessary IP route cleanup attempt, an error message
was printed for every remote node deletion:

    Unable to delete the IPsec route OUT from the host routing table

This commit fixes it to avoid attempting this unnecessary cleanup.

Fixes: 3e59b68 ("ipsec: Per-node XFRM states & policies for EKS & AKS")
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
@pchaigno pchaigno added release-note/bug This PR fixes an issue in a previous release of Cilium. area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. needs-backport/1.11 needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch labels Jun 9, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.12.11 Jun 9, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.11.18 Jun 9, 2023
@pchaigno
Copy link
Member Author

pchaigno commented Jun 9, 2023

/test

@pchaigno pchaigno marked this pull request as ready for review June 12, 2023 07:37
@pchaigno pchaigno requested review from a team as code owners June 12, 2023 07:37
@pchaigno pchaigno requested a review from jibi June 12, 2023 07:37
@michi-covalent michi-covalent added this to Needs backport from main in 1.12.12 Jun 12, 2023
@michi-covalent michi-covalent removed this from Needs backport from main in 1.12.11 Jun 12, 2023
@pchaigno pchaigno added release-blocker/1.11 This issue will prevent the release of the next version of Cilium. release-blocker/1.12 This issue will prevent the release of the next version of Cilium. release-blocker/1.13 This issue will prevent the release of the next version of Cilium. labels Jun 13, 2023
@qmonnet
Copy link
Member

qmonnet commented Jun 13, 2023

I see two instances of #25964 and one of #26009 in the failed Conformance ginkgo test, I'm re-triggering the failed jobs (the workflow is not “required” anyway).
[EDIT: I had to re-trigger all jobs for the workflow, as the cached items were gone.]

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jun 13, 2023
@pchaigno pchaigno merged commit 1e1e2f7 into cilium:main Jun 13, 2023
64 of 65 checks passed
@pchaigno pchaigno deleted the fix-spurious-ipsec-error-messages branch June 13, 2023 08:37
@qmonnet qmonnet added backport-pending/1.13 The backport for Cilium 1.13.x for this PR is in progress. and removed needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch labels Jun 13, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.11 in 1.11.18 Jun 13, 2023
@qmonnet qmonnet removed this from Needs backport from main in 1.12.12 Jun 13, 2023
@qmonnet qmonnet added this to Backport pending to v1.12 in 1.12.11 Jun 13, 2023
@qmonnet qmonnet added this to Backport pending to v1.13 in 1.13.4 Jun 13, 2023
@qmonnet qmonnet moved this from Backport pending to v1.13 to Backport done to v1.13 in 1.13.4 Jun 14, 2023
@qmonnet qmonnet added backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. and removed backport-pending/1.13 The backport for Cilium 1.13.x for this PR is in progress. labels Jun 14, 2023
@qmonnet qmonnet moved this from Backport pending to v1.12 to Backport done to v1.12 in 1.12.11 Jun 14, 2023
@qmonnet qmonnet added backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. and removed backport-pending/1.12 labels Jun 14, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.11 to Backport done to v1.11 in 1.11.18 Jun 14, 2023
@qmonnet qmonnet moved this from Backport pending to v1.11 to Backport done to v1.11 in 1.11.18 Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/encryption Impacts encryption support such as IPSec, WireGuard, or kTLS. backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-blocker/1.11 This issue will prevent the release of the next version of Cilium. release-blocker/1.12 This issue will prevent the release of the next version of Cilium. release-blocker/1.13 This issue will prevent the release of the next version of Cilium. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
No open projects
1.11.18
Backport done to v1.11
1.12.11
Backport done to v1.12
1.13.4
Backport done to v1.13
Development

Successfully merging this pull request may close these issues.

None yet

3 participants