Repository navigation
Conversation
Move devices with a `%d` name template before renaming them in the target network namespace. This lets the kernel expand the template and lets crun continue configuring the interface by its index. Add a regression test. Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com> Assisted-by: Codex GPT-6
kolyshkin
reviewed
Oct 21, 2026
kolyshkin
left a comment
Collaborator
There was a problem hiding this comment.
FWIW runc also has the same issue (meaning, I guess, no one uses %d interface names).
Collaborator
|
Closing this PR because this account is engaged in PR farming (see moby/buildkit#7303 (comment) for details). @sairex53 please do not contribute to this repo. |
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.
Fixes #2331
When
netDevices.namecontains%d, the kernel chooses the final interface name during rename. crun was asking the kernel to move and rename the device in one request, then looking it up by the literal template. Move it first, look it up by its original name in the target network namespace, then rename it there and continue configuring it by ifindex.Add a regression case to the net-device test using
newtest%dand verifying thatnewtest0is available inside the container.Validation on Fedora 44 aarch64:
make -j2 cruncrun exit: 0); confirmed it failed before the fix withNo such devicemake clang-format,python3 -m py_compile tests/test_devices.py,git diff --check