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

linux: devices: increase priority of user choice #31200

Merged

Conversation

bimmlerd
Copy link
Member

@bimmlerd bimmlerd commented Mar 6, 2024

The devices controller contains the logic to determine which devices are considered "selected" - that is, which devices cilium considers for things like the choice of direct routing device, etc.

As part of this logic, we look at the user-provided configuration, in the form of the '--devices' flag. However, existing code is slightly too opinionated in that it excludes the loopback device before it looks at what the user specifies. It has been reported that using the loopback interface lo as the direct routing device worked in 1.14, but no longer does in 1.15. As this is a somewhat unusual setup, we require the user to specifically include 'lo' into the devices and respect their choice in the selection logic.

Fixes: 03ad61b (datapath/linux: Implement DevicesController)

Fixes: #30889

Cilium allows selecting 'lo' as a device again.

The devices controller contains the logic to determine which devices are
considered "selected" - that is, which devices cilium considers for
things like the choice of direct routing device, etc.

As part of this logic, we look at the user-provided configuration, in
the form of the '--devices' flag. However, existing code is slightly too
opinionated in that it excludes the loopback device before it looks at
what the user specifies. It has been reported that using the loopback
interface lo as the direct routing device worked in 1.14, but no longer
does in 1.15. As this is a somewhat unusual setup, we require the user
to specifically include 'lo' into the devices and respect their choice
in the selection logic.

Fixes: 03ad61b (datapath/linux: Implement DevicesController)

Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
@bimmlerd bimmlerd requested a review from joamaki March 6, 2024 14:05
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 6, 2024
@bimmlerd bimmlerd added area/daemon Impacts operation of the Cilium daemon. release-note/bug This PR fixes an issue in a previous release of Cilium. sig/agent Cilium agent related. needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch and removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Mar 6, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.15.2 Mar 6, 2024
@bimmlerd bimmlerd marked this pull request as ready for review March 6, 2024 14:14
@bimmlerd bimmlerd requested a review from a team as a code owner March 6, 2024 14:14
@bimmlerd
Copy link
Member Author

bimmlerd commented Mar 6, 2024

/test

@joamaki joamaki added this pull request to the merge queue Mar 6, 2024
Merged via the queue into cilium:main with commit 2b51393 Mar 6, 2024
64 checks passed
@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 Mar 6, 2024
@bimmlerd bimmlerd deleted the pr/bimmlerd/prioritize-user-device-selection branch March 6, 2024 16:21
@bimmlerd bimmlerd added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Mar 6, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.15 in 1.15.2 Mar 6, 2024
@github-actions github-actions bot added backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. labels Mar 7, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.15 to Backport done to v1.15 in 1.15.2 Mar 7, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed this from Backport done to v1.15 in 1.15.2 Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/daemon Impacts operation of the Cilium daemon. backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium. sig/agent Cilium agent related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loopback lo device no longer considered for Direct Routing in 1.15
2 participants