Fix issues that prevent using RawNetworkInterfaceDriver's network namespace feature#1887
Open
nick-potenski wants to merge 2 commits into
Open
Fix issues that prevent using RawNetworkInterfaceDriver's network namespace feature#1887nick-potenski wants to merge 2 commits into
nick-potenski wants to merge 2 commits into
Conversation
Removes the '-m' option from the nsenter call in the netns.py agent. The option should have been removed by bcfed98, but was missed. This is necessary to allow the network namespace support to work without admin privileges. Signed-off-by: Nick Potenski <nick.potenski@garmin.com>
Contributor
Author
|
With these changes, I am now able to setup and use a network namespace in our Labgrid system. I didn't file bug reports for these, but I can do so for tracking if you would like. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1887 +/- ##
======================================
Coverage 46.0% 46.0%
======================================
Files 180 180
Lines 14464 14464
======================================
Hits 6654 6654
Misses 7810 7810
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Emantor
reviewed
Jun 9, 2026
Emantor
previously approved these changes
Jun 9, 2026
Emantor
left a comment
Member
There was a problem hiding this comment.
Looks good to me aside from the nit.
Versions of iproute2 older than 6.0.0, such as those shipped with Ubuntu 22, do not support the '-echo' option. Rewrites the labgrid-raw-interface's handle_ns_macvtap() method to no longer rely on echoing back the result of the 'ip link add' command to determine the new interface name. Signed-off-by: Nick Potenski <nick.potenski@garmin.com>
9840476 to
fb5a15b
Compare
Emantor
approved these changes
Jun 9, 2026
Contributor
Author
|
I would appreciate if these changes could be added to the 26.x branch as well. |
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.
Description
Fixes several issues encountered when trying to use RawNetworkInterfaceDriver's setup_netns() method.
First, older version of iproute2 do not include the
-echooption. When trying to uselabgrid-raw-interfaceon a exporter running Ubuntu 22, this would lead to failures when trying to create the macvtap.Second, the
-mmounts option was still being passed to thensentercall by the netns agent script even though mount namespace support was dropped by bcfed98. This would result in failure like the following when trying to setup the namespace:Checklist