Re: [systemd-devel] Container, private network and socket activation

2015-02-04 Thread Mikhail Morfikov
That indicates that the systemd or apache inside the container do not correctly make use of the the socket passed into them. You need to make sure that inside the container you have pretty much the same .socket unit running as on the host. The ListStream lines must be identical, so that

Re: [systemd-devel] Container, private network and socket activation

2015-02-04 Thread Lennart Poettering
On Wed, 04.02.15 04:40, Mikhail Morfikov (mmorfi...@gmail.com) wrote: 1. When I try to connect for the very first time, I get a timeout, even though the container is working. I can cancel the connection immediately, and reconnect after 2-3 sec and then the page shows up. All subsequent

Re: [systemd-devel] Container, private network and socket activation

2015-02-03 Thread Tomasz Torcz
On Tue, Feb 03, 2015 at 11:28:09PM +0100, Christian Seiler wrote: Am 03.02.2015 um 22:06 schrieb Lennart Poettering: Socket activation is somethings daemons need to support explicitly. Many do these days, but I don't think Apache is one of them. FYI: all released versions (i.e. up to

Re: [systemd-devel] Container, private network and socket activation

2015-02-03 Thread Mikhail Morfikov
Hmm, to implement something like this I think the best option would be to set up the interface to later pass to the container first on the host, then listen on the container's IP address on the host. When a connection comes in the container would have to be started via socket activation, and

Re: [systemd-devel] Container, private network and socket activation

2015-02-03 Thread Lennart Poettering
On Tue, 03.02.15 02:36, Mikhail Morfikov (mmorfi...@gmail.com) wrote: So, everything works pretty well. Now there's a problem, how to add socket activation to this container? Well, the sockets for socket activated containers are created on the host's namespace, not the container's

Re: [systemd-devel] Container, private network and socket activation

2015-02-03 Thread Christian Seiler
Am 03.02.2015 um 22:06 schrieb Lennart Poettering: Socket activation is somethings daemons need to support explicitly. Many do these days, but I don't think Apache is one of them. FYI: all released versions (i.e. up to 2.4.x) of Apache httpd don't support it yet, but the current development

Re: [systemd-devel] Container, private network and socket activation

2015-02-03 Thread Mikhail Morfikov
Also note that using socket activation for cotnainers means that systemd instance inside the container also needs to have configuration for the socket, to pass it on to the service that ultimately shall answer for it. Are you sure that apache2 has support for that, and that you set it up?

Re: [systemd-devel] Container, private network and socket activation

2015-02-03 Thread Lennart Poettering
On Tue, 03.02.15 20:45, Mikhail Morfikov (mmorfi...@gmail.com) wrote: Also note that using socket activation for cotnainers means that systemd instance inside the container also needs to have configuration for the socket, to pass it on to the service that ultimately shall answer for it.

[systemd-devel] Container, private network and socket activation

2015-02-02 Thread Mikhail Morfikov
I've set up a container via systemd-nspawn tool, and I wanted to use the private network feature. The line that launches the container includes --network-bridge= and --network-veth options. The whole systemd .service file looks like this: [Unit] Description=My little container [Service]