On Mon, 02.11.15 14:52, Aliaksei Sheshka (sheshka...@gmail.com) wrote: > On Mon, Nov 2, 2015 at 1:05 PM, Lennart Poettering > <lenn...@poettering.net> wrote: > > > > > > BTW: another way to deal with network namespaces in systemd is via > > PrivateNetwork=yes and JoinsNamespaceOf=, but I am not whether that > > matches what you want to do... > > Perhaps, I've tried > > [Unit] > Description=mydaemon withing c7-test network context > After=network.target > > [Service] > TimeoutStartSec=10 > ExecStart=/usr/sbin/mydaemon > JoinsNamespaceOf=c7-test.service > PrivateTmp=yes > PrivateNetwork=yes > > [Install] > WantedBy=multi-user.target > > > but looks likes it creates new namespace, because 'mydaemon' sees only > 127.0.0.1 with such unit. > c7-test unit is 100% running. > Another question, would 'machinectl poweroff c7-test' terminate > [properly configured] 'mydaemon' unit as well ?
Note that all units you join need to have PrivateNetwork=yes set if they shall live in the same namespace. Did both your units have this set? Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel