10000 v1.16: backport "Fix lo and fallback node address selection" by joamaki · Pull Request #34085 · cilium/cilium · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

v1.16: backport "Fix lo and fallback node address selection" #34085

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

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

joamaki
Copy link
Contributor
@joamaki joamaki commented Jul 30, 2024

Once this PR is merged, a GitHub action will update the labels of these PRs:

 34012

@joamaki joamaki added kind/backports This PR provides functionality previously merged into master. backport/1.16 This PR represents a backport for Cilium 1.16.x of a PR that was merged to main. labels Jul 30, 2024
@joamaki joamaki changed the title v1.16 Backports 2024-07-30 v1.16: backport "Fix lo and fallback node address selection" Jul 30, 2024
@joamaki
Copy link
Contributor Author
joamaki commented Jul 30, 2024

/test-backport-1.16

joamaki added 2 commits July 30, 2024 14:49
[ upstream commit a9e9666 ]

This fixes a regression where the non-loopback addresses assigned
to the loopback device (lo) were not considered host/node addresses.
This broke the practice of assigning VIPs to the loopback device to
make Cilium consider them.

The problem was due to filtering on "ExcludedDevicePrefixes" that included
"lo". This filtering is already done in the devices controller that populates
the Table[Device] that this code reads, so this filtering can be dropped.
In addition to this the fix whitelists the lo device to make it unnecessary
to specify "--devices=lo,..." and thus retaining the same semantics as
v1.14.

Fixes: #33214

Signed-off-by: Jussi Maki <jussi@isovalent.com>
[ upstream commit 28e9ade ]

The fallback is used for e.g. BPF masquerading when the target device has no address,
this is "best effort" for ECMP etc. setups). The selection algorithm for the fallback node
address wasn't taking into account whether the device was selected or not, which led to
the fallback address being taken from non-selected devices.

Add selected as the first criteria for checking if a fallback is better. And to avoid
unnecessary churn on updating the fallback, always skip lxc* devices.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
@joamaki joamaki force-pushed the pr/v1.16-backport-2024-07-30-02-14 branch from 8c448af to 387de6e Compare July 30, 2024 12:49
@joamaki
Copy link
Contributor Author
joamaki commented Jul 30, 2024

/test-backport-1.16

@joamaki joamaki marked this pull request as ready for review August 2, 2024 10:01
@joamaki joamaki requested a review from a team as a code owner August 2, 2024 10:01
@joamaki joamaki added the release-blocker/1.16 This issue will prevent the release of the next version of Cilium. label Aug 5, 2024
@dylandreimerink dylandreimerink added this pull request to the merge queue Aug 5, 2024
@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 Aug 5, 2024
Merged via the queue into v1.16 with commit 277a878 Aug 5, 2024
277 of 279 checks passed
@dylandreimerink dylandreimerink deleted the pr/v1.16-backport-2024-07-30-02-14 branch August 5, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.16 This PR represents a backport for Cilium 1.16.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-blocker/1.16 This issue will prevent the release of the next version of Cilium.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants
0