Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-22 Thread Spencer Baugh
Lennart Poettering lenn...@poettering.net writes: On Tue, 21.04.15 15:22, Spencer Baugh (sba...@catern.com) wrote: Also, trivial static IP configuration is seldom sufficient, you at least need to also provide DNS configuration, and if you don't use DHCP or something similar then you need

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-22 Thread Lennart Poettering
On Wed, 22.04.15 13:41, Spencer Baugh (sba...@catern.com) wrote: Lennart Poettering lenn...@poettering.net writes: On Tue, 21.04.15 15:22, Spencer Baugh (sba...@catern.com) wrote: Also, trivial static IP configuration is seldom sufficient, you at least need to also provide DNS

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-22 Thread Spencer Baugh
Lennart Poettering lenn...@poettering.net writes: On Wed, 22.04.15 13:41, Spencer Baugh (sba...@catern.com) wrote: Lennart Poettering lenn...@poettering.net writes: Well, again, I doubt that configuration exclusivel at interface-creation-time will be useful for more than the most trivial

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-22 Thread Lennart Poettering
On Wed, 22.04.15 15:52, Spencer Baugh (sba...@catern.com) wrote: As soon as networkd gains a bus interface maybe an option could be to hook up nspawn's --network-interface= with it: if the specified interface doesn't exist, nspawn could synchronously ask networkd to create it. With that

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-22 Thread Lennart Poettering
On Tue, 21.04.15 15:22, Spencer Baugh (sba...@catern.com) wrote: Also, trivial static IP configuration is seldom sufficient, you at least need to also provide DNS configuration, and if you don't use DHCP or something similar then you need to configure that inside the container anyway. But

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-21 Thread Spencer Baugh
Lennart Poettering lenn...@poettering.net writes: On Tue, 21.04.15 10:58, Spencer Baugh (sba...@catern.com) wrote: The MAC address is currently generated as hash value from the container name, it hence should be completely stable already as long as you keep using the same name for the

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-21 Thread Spencer Baugh
Lennart Poettering lenn...@poettering.net writes: On Mon, 20.04.15 22:50, Spencer Baugh (sba...@catern.com) wrote: Yes, in that case, it is of course very simple, but it is not at all configurable. I have one thing and one thing only that I want to configure: The IP address that a given

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-21 Thread Lennart Poettering
On Mon, 20.04.15 22:50, Spencer Baugh (sba...@catern.com) wrote: Lennart Poettering lenn...@poettering.net writes: On Mon, 20.04.15 15:25, Spencer Baugh (sba...@catern.com) wrote: So far I'd recommend running networkd on the host and in the container. If you run it on the host, then it

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-21 Thread Lennart Poettering
On Tue, 21.04.15 10:58, Spencer Baugh (sba...@catern.com) wrote: The MAC address is currently generated as hash value from the container name, it hence should be completely stable already as long as you keep using the same name for the container? Well, generally I want to know what

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-20 Thread Lennart Poettering
On Mon, 20.04.15 15:25, Spencer Baugh (sba...@catern.com) wrote: Hi, Currently, I can manually set up (or set up with a script) a veth, then move it in to a systemd-nspawn container with --network-interface. However, if the container tries to restart (or exits and needs to be restarted),

Re: [systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-20 Thread Spencer Baugh
Lennart Poettering lenn...@poettering.net writes: On Mon, 20.04.15 15:25, Spencer Baugh (sba...@catern.com) wrote: So far I'd recommend running networkd on the host and in the container. If you run it on the host, then it will automatically configure the hos side of each of nspawn's veth links

[systemd-devel] Setting up network interfaces for containers with --private-network

2015-04-20 Thread Spencer Baugh
Hi, Currently, I can manually set up (or set up with a script) a veth, then move it in to a systemd-nspawn container with --network-interface. However, if the container tries to restart (or exits and needs to be restarted), the network namespace of the container is destroyed and therefore so is