[systemd-devel] systemd-nspawn and process spawning using nsenter issue
Aliaksei Sheshka
sheshkaoss at gmail.com
Mon Nov 2 11:52:46 PST 2015
On Mon, Nov 2, 2015 at 1:05 PM, Lennart Poettering
<lennart at 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 ?
More information about the systemd-devel
mailing list