Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 416643 - app-emulation/lxc - init script cgroup is hard coded, should be dynamic or user configuration
Summary: app-emulation/lxc - init script cgroup is hard coded, should be dynamic or us...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-19 15:22 UTC by J.O. Aho
Modified: 2014-12-25 16:09 UTC (History)
4 users (show)

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


Attachments
Kernel configuration which makes the cgroup directory to be /sys/fs/cgroup/lxc/ (config.gz,14.60 KB, application/x-gzip)
2012-05-19 16:38 UTC, J.O. Aho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description J.O. Aho 2012-05-19 15:22:24 UTC
The init script that comes with 0.8.0-rc1 assumes the cgroup path to be:

/sys/fs/cgroup/cpuset/lxc/

which causes the init script to say the starting of the container fails even if it's up and running and the init script can't stop the container at all, as it don't think it's up and running.

As the cgroup path can be different depending on the modules built for the host kernel, then the path shouldn't be hard coded in the init script, but be configurable in a /etc/conf.d/lxc config file, so that those who have the cgroup path of 

/sys/fs/cgroup/lxc/

don't have to worry that at the next update of lxc they have to modify the init script again.

Even better had been if the init script could find the correct path without configuration and use it, but I guess that would require a lot more work and knowledge of all the possible paths that are in use and may be use in the future, so the configuration file would be more than acceptable.
Comment 1 J.O. Aho 2012-05-19 16:38:00 UTC
Created attachment 312285 [details]
Kernel configuration which makes the cgroup directory to be /sys/fs/cgroup/lxc/
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-05-21 03:48:02 UTC
What is the configuration you're attaching? It's definitely not text/plain but I'd rather have just the settings for CGROUPS.
Comment 3 J.O. Aho 2012-05-21 16:46:12 UTC
Sorry, the config.gz is from my desktop machine, not from the "server".

Here is the CGROUPS set in the "servers" kernel config:

# zgrep CGROUP /proc/config.gz 
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_MEM_RES_CTLR=y
CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED=y
# CONFIG_CGROUP_MEM_RES_CTLR_KMEM is not set
# CONFIG_CGROUP_PERF is not set
CONFIG_CGROUP_SCHED=y
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
# CONFIG_NET_CLS_CGROUP is not set
CONFIG_NETPRIO_CGROUP=m
Comment 4 J.O. Aho 2012-05-21 16:46:54 UTC
Should have mentioned which kernel too:

# cat /proc/version 
Linux version 3.3.4-gentoo (root@nfs) (gcc version 4.5.3 (Gentoo 4.5.3-r1 p1.0, pie-0.4.5) ) #1 SMP Tue May 8 22:05:37 CEST 2012
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2014-12-21 10:08:54 UTC
I do understand that this has not been fixed in the init script but maybe this is not an issue anymore with recent kernels? I do have /sys/fs/cgroups/cpuset so maybe the path has been standardized in the recent kernels?

Please re-open if you still have problems