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

Replace mnexec with unshare(1)? #944

Open
ghost opened this issue May 14, 2020 · 2 comments
Open

Replace mnexec with unshare(1)? #944

ghost opened this issue May 14, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented May 14, 2020

There's nothing specific on this question in Github issue history or git log -Gunshare. The outcome of this ticket would be replacing mnexec with unshare(1) (ubuntu util-linux) or a comment in mnexec.c why it's insufficient for mininet. Removing the C compiler dependency would be nice.

@ghost ghost changed the title Replace mnexec with unshare? Replace mnexec with unshare(1)? May 14, 2020
@cheriimoya
Copy link
Contributor

this is actually really interesting, by running unshare -n -c bash and then ip l i only see the loopback interface, this might work somehow...
do you have any opinion on this @lantz ?

@lantz
Copy link
Member

lantz commented Feb 6, 2022

Yes,

  1. unshare didn't work properly when mininet was developed, and it was also missing from ubuntu.
  2. mnexec has additional features that unshare doesn't support, including pid output and attaching to an existing namespace. However we might be able to finesse this by a) explicitly printing the pid and b) using ip nsenter or ip netns exec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants