Fix issues that prevent using RawNetworkInterfaceDriver's network namespace feature#1887
Fix issues that prevent using RawNetworkInterfaceDriver's network namespace feature#1887nick-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>
|
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
left a comment
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
|
I would appreciate if these changes could be added to the 26.x branch as well. |
|
@jluebbe - Did you have any feedback on this change? |
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