[systemd-devel] Something is removing links from my *.wants/ directory

Adam Papai wooh at wooh.hu
Thu Dec 11 01:17:22 PST 2014

Hey Guys,

We're running Arch Linux kernel-3.15 with lxc containers, systemd 215
without any issue.

But with 3.17 + systemd 217 we have very strange issues:

We have this target file:

[root at i-8452c468 system]#  cat /home/wooh/container/system/container.target


[root at i-8452c468 system]# pwd

We have these links in:
[root at i-8452c468 system]# ls -lart container.target.wants/
total 8
lrwxrwxrwx 1 root root   38 Apr 27  2014 dns-resset.service ->
drwxr-xr-x 8 root root 4096 Dec 11 08:51 ..
lrwxrwxrwx 1 root root   41 Dec 11 09:01 private-mount.service ->
lrwxrwxrwx 1 root root   48 Dec 11 09:01 jenkins-master-runit.service ->
lrwxrwxrwx 1 root root   49 Dec 11 09:01 container-mail-forward.socket ->
lrwxrwxrwx 1 root root   35 Dec 11 09:01 sshd.socket ->
lrwxrwxrwx 1 root root   40 Dec 11 09:01 iptables.service ->
lrwxrwxrwx 1 root root   39 Dec 11 09:01 check-private.timer ->
lrwxrwxrwx 1 root root   41 Dec 11 09:01 check-private.service ->

These links are created by chef and/or coming from an EC2 volume-snapshot,
so some of them are already there for years.

But when I start the linux-contaner using the following command below,
almost all links in container.target.wants/ gets deleted, except 1 or 2.

/usr/bin/lxc-start -d -n wooh -l DEBUG -o /tmp/lxc-container-wooh.log -L
/tmp/lxc-console-wooh.log -f /var/lib/lxc/master-config-wooh /sbin/init

This link remains only, all others disappear:

lrwxrwxrwx 1 root root   38 Apr 27  2014 dns-resset.service ->

Any idea why my links get deleted from the .target directory? This happens
only on the very first run. After the first lxc-container boot up,
systemctl status shows me "degraded" state inside of the container.

When I re-create the links or chef re-creates them, and I stop/start the
container or even reload the config inside of the container and restart
container.target service, everything is working fine.

Why and what is removing my files from the target directories? Those are
required to run the lxc-container properly otherwise it'll boot up in a
dergaded state, without ssh and iptables forwarding and so on.

What did I miss? Is it something change between 215 - 217? I debugged it
with strace and lxc-start does nothing with those files.

Any help is appreciated!

Thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141211/b0e37342/attachment-0001.html>

More information about the systemd-devel mailing list