Repository navigation
Conversation
Hostif TAP interfaces were named "<name>-internal". For eth1000 and above this is 16+ characters, exceeding the Linux IFNAMSIZ limit (15 chars), so TAP creation failed with "Link not found" and the interface reconciler aborted startup. Use "<name>-internal" when it fits, fall back to "<name>-int", and finally to "if<ifindex>-int" for very long names. Also fix a log.Info call that should be log.Infof. Fixes b/540538596
manizzzz
approved these changes
Oct 28, 2026
manizzzz
left a comment
There was a problem hiding this comment.
Thanks Kris, LGTM! Left a few non-blocking comments and follow-up ideas below.
Separate from this PR, we should probably clean up the error chain from the bug report in a follow-up (dataplane/server.go logs a reconciler start error as "failed to stop handler", the reconciler ID is "inferface", and the actual error comes back as "Link not found" instead of checking the name length up front in CreateHostif or tap.New).
… rename shadowed variable
setupPorts used the interface's position in the name-sorted link list as the port's hardware lane, but saiserver binds a port to the kernel interface eth<lane>. With more than ten ports eth10 sorts before eth2, so ports were bound to the wrong kernel interfaces. Parse the lane from the ethN name instead, falling back to the list index for other names.
Contributor
Author
|
Thanks for the review! Agreed on cleaning up the error chain (the misleading "failed to stop handler" log, the |
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.
Problem
Lemming crashes on startup when the device has 1000 or more interfaces (e.g. a KNE topology with
eth1..eth1500):For each front-panel interface, the interface reconciler creates a hostif TAP named
<name>-internal. Foreth1000and above, that name is 16+ characters. Linux interface names are limited to 15 characters (IFNAMSIZ- 1), so creating the TAP fails and the reconciler stops startup.The
fwdcontext: unable to send notification in context ... nil queuewarning that also shows up in the logs isn't related. It's logged on every startup, because ports are created before anything subscribes to port state notifications.Fix
Pick a hostif name that always fits:
<name>-internalif it fits. This is unchanged foreth1..eth999, so existing topologies behave the same.<name>-int(e.g.eth1000-int).if<ifindex>-int. The ifindex is unique within the network namespace, so this name is unique too.setupPortsnow recognizes both suffixes when skipping existing hostif devices. Also:log.Infocall that should belog.Infof.Testing
hostifName/isHostifName, covering the name length limit, uniqueness, and suffix detection.ethNinterfaces:eth1000-internal.-intform), and lemming initialization completes.