When using app-emulation/lxc-1.1.2 (though I think it might happen with every 1.1.x release) fails to start my container through an init script. It fails with "Unable to find a suitable configuration file." "If you set up the container in a non-standard" "location, please set the CONFIGFILE variable." This can be fixed by changing LXC_PATH="/var/lib" to LXC_PATH="/var/lib/lxc" in /etc/init.d/lxc Reproducible: Always Steps to Reproduce: 1. lxc-create --bdev lvm --vgname foo --name foo --fstype xfs --template gentoo 2. ln -s /etc/init.d/lxc /etc/init.d/lxc.foo 3. /etc/init.d/lxc.foo start Actual Results: Fails to start. "Unable to find a suitable configuration file." "If you set up the container in a non-standard" "location, please set the CONFIGFILE variable." Expected Results: The container should start
Should this value be hardwired in the init script in the first place? 10:48:49 root:~# lxc-config lxc.lxcpath /var/lib/lxc 10:49:01 root:~# echo "lxc.lxcpath = /etc/lxc" > /etc/lxc/lxc.conf 10:50:45 root:~# lxc-config lxc.lxcpath /etc/lxc 10:50:47 root:~#
Created attachment 404388 [details, diff] init patch I hit this last night also. Patch is attached.
Well the templates are based on openrc (as discussed in the pull request). So I am closing this as upstream as I see no urgent reason to patch the downstream templates to add systemd support at the moment. As suggested, I believe it's best to document systemd needs in the Gentoo LXC wiki.
Sorry, I obviously commented on the wrong bug
+*lxc-1.1.2-r2 (13 Jun 2015) + + 13 Jun 2015; Markos Chandras <hwoarang@gentoo.org> +lxc-1.1.2-r2.ebuild, + files/lxc.initd.3: + Do not hardcode LXC_PATH. Bug #548568. Patch by Erik Mackdanz + <erikmack@gmail.com> +