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

nspawn: Support multiple virtual Enternet links (veth) #3044

Closed
1 of 2 tasks
niklutz opened this issue Apr 15, 2016 · 1 comment
Closed
1 of 2 tasks

nspawn: Support multiple virtual Enternet links (veth) #3044

niklutz opened this issue Apr 15, 2016 · 1 comment
Labels
already-implemented nspawn RFE 🎁 Request for Enhancement, i.e. a feature request

Comments

@niklutz
Copy link

niklutz commented Apr 15, 2016

Submission type

  • Bug report
  • Request for enhancement (RFE)

Current situation

Its simple to create a container with a single veth using --network-veth and --network-bridge.
Adding a second interfaces requires a lot of scripting since --network-veth-extra requires the interface to exist (and does not add it to a bridge).

Question

  • Since nspawn already knows how to create veths (adding it to a bridge, removing it when the container stops, ...) makes me wonder if there are any plans to support multiple veths? (I dont like the idea of duplicating this functionality in scripts)
  • Would you accept a patch, and if yes:
    • Extending --network-veth to accept optional arguments (like myveth1, myveth2) and extending --network-bridge to accept multiple bridges might break current users since the "-n" option would disappear (would it?) - is this acceptable or should an additonal option be added?

Possible implementation

  • Get arguments in nspawn.c and loop calling setup_veth(..., idx)
  • nspawn-network.c
    • add_veth should get an additional parameter idx
    • setup_veth should get an additional parameter idx

Am I missing something?

@poettering
Copy link
Member

Hmm? I think this is a misunderstanding. --network-veth-extra= in fact will create a new veth pair each time you use it. It requires no extra scripting, it will add a completely new veth pair on its own. In fact if there's already some interface around by the name specified then the operation will fail.

(--network-interface= otoh is the switch to move an existing iface into the container, but that's something completely different...)

Closing, since what is being asked for already exists.

@poettering poettering added RFE 🎁 Request for Enhancement, i.e. a feature request nspawn already-implemented labels Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
already-implemented nspawn RFE 🎁 Request for Enhancement, i.e. a feature request
Development

No branches or pull requests

2 participants