FS#65982 - [lxc] lxc-auto.service not starting properly
Attached to Project:
Community Packages
Opened by crito (crito) - Wednesday, 25 March 2020, 23:03 GMT
Last edited by freswa (frederik) - Monday, 30 March 2020, 13:58 GMT
Opened by crito (crito) - Wednesday, 25 March 2020, 23:03 GMT
Last edited by freswa (frederik) - Monday, 30 March 2020, 13:58 GMT
|
Details
Description:
when using lxc-auto.service to start containers on boot systemd will invoke lxc-autostart and fork it into background. After lxc-autostart is done the process ends and systemd invokes lxc-autostart -s as ExecStop command. Therefore containers will never in running state after boot. Additional info: pacman -Q lxc lxc 1:4.0.0-1 container config: ``` lxc.include = /usr/share/lxc/config/common.conf lxc.arch = linux64 lxc.rootfs.path = dir:/var/lib/lxc/test/rootfs lxc.uts.name = test lxc.autodev = 1 lxc.net.0.type = veth lxc.net.0.link = br0 lxc.net.0.flags = up lxc.net.0.ipv4.address = 10.0.0.2/24 lxc.net.0.ipv4.gateway = 10.0.0.1 lxc.start.auto = 1 ``` afaik this service file is not available in upstream project. Steps to reproduce: ``` lxc-create -n test -t download -- -d debian -r buster -a amd64 echo "lxc.start.auto = 1" >> /var/lib/lxc/test/config systemctl start lxc-auto journalctl -xe -- The unit lxc-auto.service has successfully entered the 'dead' state. Mar 25 22:56:43 testvm systemd[1]: Started Autostart LXC Container. -- Subject: A start job for unit lxc-auto.service has finished successfully -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- A start job for unit lxc-auto.service has finished successfully. -- -- The job identifier is 374. Mar 25 22:56:43 testvm audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=lxc-auto comm="systemd" exe="/us> Mar 25 22:56:43 testvm audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=lxc-auto comm="systemd" exe="/usr> Mar 25 22:56:43 testvm kernel: audit: type=1130 audit(1585177003.219:81): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=lxc-a> Mar 25 22:56:43 testvm kernel: audit: type=1131 audit(1585177003.219:82): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=lxc-a> Mar 25 22:56:43 testvm systemd-networkd[425]: br0: Lost carrier ``` |
This task depends upon
Closed by freswa (frederik)
Monday, 30 March 2020, 13:58 GMT
Reason for closing: Fixed
Additional comments about closing: 1:4.0.0-2
Monday, 30 March 2020, 13:58 GMT
Reason for closing: Fixed
Additional comments about closing: 1:4.0.0-2
Comment by Sergej Pupykin (sergej) -
Sunday, 29 March 2020, 20:54 GMT
Comment by crito (crito) - Monday,
30 March 2020, 12:34 GMT
please try lxc-1:4.0.0-2
thx. works as expected.