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

2014-12-12 Thread Adam Papai
Yeah, something similar is happening. If I edit the container.target and
add the Wants= instead of creating the .wants directory it works well.

I think the preset-all is syncing the config with the .wants directory as
well and removes all links which are not defined in the config. So editing
the unit file solved my issue.

Thanks!

On Fri, Dec 12, 2014 at 3:43 PM, Colin Guthrie gm...@colin.guthr.ie wrote:

 Adam Papai wrote on 11/12/14 09:17:
  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!

 Just as a random guess, systemctl preset-all is perhaps now run when
 /etc/ is detected as empty as part of the first-boot stuff to initialise
 /etc properly... perhaps this is to blame?

 Col


 --

 Colin Guthrie
 gmane(at)colin.guthr.ie
 http://colin.guthr.ie/

 Day Job:
   Tribalogic Limited http://www.tribalogic.net/
 Open Source:
   Mageia Contributor http://www.mageia.org/
   PulseAudio Hacker http://www.pulseaudio.org/
   Trac Hacker http://trac.edgewall.org/




-- 
Adam PAPAI
E-mail: w...@wooh.hu
Phone: +36 30 33-55-375
Web: http://www.wooh.hu
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-12-11 Thread Adam Papai
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@i-8452c468 system]#  cat /home/wooh/container/system/container.target
[Unit]
Description=container.target
Requires=basic.target

[Install]
Alias=container.target

Pwd:
[root@i-8452c468 system]# pwd
/home/wooh/container/system

We have these links in:
[root@i-8452c468 system]# ls -lart container.target.wants/
total 8
lrwxrwxrwx 1 root root   38 Apr 27  2014 dns-resset.service -
/etc/systemd/system/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 -
/etc/systemd/system/private-mount.service
lrwxrwxrwx 1 root root   48 Dec 11 09:01 jenkins-master-runit.service -
/etc/systemd/system/jenkins-master-runit.service
lrwxrwxrwx 1 root root   49 Dec 11 09:01 container-mail-forward.socket -
/etc/systemd/system/container-mail-forward.socket
lrwxrwxrwx 1 root root   35 Dec 11 09:01 sshd.socket -
/usr/lib/systemd/system/sshd.socket
lrwxrwxrwx 1 root root   40 Dec 11 09:01 iptables.service -
/usr/lib/systemd/system/iptables.service
lrwxrwxrwx 1 root root   39 Dec 11 09:01 check-private.timer -
/etc/systemd/system/check-private.timer
lrwxrwxrwx 1 root root   41 Dec 11 09:01 check-private.service -
/etc/systemd/system/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
systemd.unit=container.target

This link remains only, all others disappear:

lrwxrwxrwx 1 root root   38 Apr 27  2014 dns-resset.service -
/etc/systemd/system/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,

-- 
Adam PAPAI
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-12-11 Thread Adam Papai
Just one more additional information:

So if I have already started the container and I stopped it, on the next
start up, it's not deleting the links at all, so this is very strange to
me. The links are the same, just links, no special attributes, same rights
as before, but on the first but up they get deleted.

On Thu, Dec 11, 2014 at 10:17 AM, Adam Papai w...@wooh.hu wrote:

 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@i-8452c468 system]#  cat
 /home/wooh/container/system/container.target
 [Unit]
 Description=container.target
 Requires=basic.target

 [Install]
 Alias=container.target

 Pwd:
 [root@i-8452c468 system]# pwd
 /home/wooh/container/system

 We have these links in:
 [root@i-8452c468 system]# ls -lart container.target.wants/
 total 8
 lrwxrwxrwx 1 root root   38 Apr 27  2014 dns-resset.service -
 /etc/systemd/system/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 -
 /etc/systemd/system/private-mount.service
 lrwxrwxrwx 1 root root   48 Dec 11 09:01 jenkins-master-runit.service -
 /etc/systemd/system/jenkins-master-runit.service
 lrwxrwxrwx 1 root root   49 Dec 11 09:01 container-mail-forward.socket -
 /etc/systemd/system/container-mail-forward.socket
 lrwxrwxrwx 1 root root   35 Dec 11 09:01 sshd.socket -
 /usr/lib/systemd/system/sshd.socket
 lrwxrwxrwx 1 root root   40 Dec 11 09:01 iptables.service -
 /usr/lib/systemd/system/iptables.service
 lrwxrwxrwx 1 root root   39 Dec 11 09:01 check-private.timer -
 /etc/systemd/system/check-private.timer
 lrwxrwxrwx 1 root root   41 Dec 11 09:01 check-private.service -
 /etc/systemd/system/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
 systemd.unit=container.target

 This link remains only, all others disappear:

 lrwxrwxrwx 1 root root   38 Apr 27  2014 dns-resset.service -
 /etc/systemd/system/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,

 --
 Adam PAPAI




-- 
Adam PAPAI
E-mail: w...@wooh.hu
Phone: +36 30 33-55-375
Web: http://www.wooh.hu
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel