Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548568 - app-emulation/lxc-1.1.2 init scripts fail to start container
Summary: app-emulation/lxc-1.1.2 init scripts fail to start container
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-04 09:37 UTC by Aljoscha Vollmerhaus
Modified: 2015-06-13 11:54 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
init patch (lxc.init.patch,270 bytes, patch)
2015-05-31 19:59 UTC, Erik Mackdanz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aljoscha Vollmerhaus 2015-05-04 09:37:18 UTC
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
Comment 1 Paul Healy 2015-05-18 09:51:05 UTC
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:~#
Comment 2 Erik Mackdanz gentoo-dev 2015-05-31 19:59:37 UTC
Created attachment 404388 [details, diff]
init patch

I hit this last night also.  Patch is attached.
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2015-06-13 11:51:38 UTC
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.
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2015-06-13 11:53:07 UTC
Sorry, I obviously commented on the wrong bug
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2015-06-13 11:54:43 UTC
+*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>
+