After upgrading sys-apps/openrc from 0.9.4 to 0.9.8.2 util-vserver-0.30.216_pre2910 does not start. During boot-up I see these messages: * Mounting cgroup-hierarchy ... mount: vserver already mounted or /dev/cgroup busy [ !! ] * ERROR: util-vserver failed to start * ERROR: cannot start vservers.default as util-vserver would not start When manually starting after boot-up, I get similar messages: # /etc/init.d/util-vserver start * Creating directories for util-vserver ... [ ok ] * Setting vshelper path to /usr/lib64/util-vserver/vshelper [ ok ] * Loading default device map ... [ ok ] * Mounting cgroup-hierarchy ... mount: vserver already mounted or /dev/cgroup busy [ !! ] * ERROR: util-vserver failed to start Downgrading to sys-apps/openrc-0.9.4 "solved" the problem... Reproducible: Always Steps to Reproduce: 1. update to sys-apps/openrc-0.9.8.2 2. boot-up (or "/etc/init.d/util-vserver start") Actual Results: util-vserver does not start with the above mentioned error messages. As a consequence, default vservers (or any other vserver-guest) does not start. Expected Results: util-vserver should start with similar messages as for sys-apps/openrc-0.9.4: ... * Creating directories for util-vserver ... [ ok ] * Setting vshelper path to /usr/lib64/util-vserver/vshelper [ ok ] * Loading default device map ... [ ok ] * Mounting cgroup-hierarchy ... [ ok ] * Starting vservers of type 'default' ... [ ok ] I'm not sure if this is actually sys-cluster/util-vserver-0.30.216_pre2910 or sys-apps/openrc-0.9.8.2 bug, but simply the last amd64/stable versions do not play together.
The newest versions of openrc create the kernel recommended cgroup setup, which is: 1) a tmpfs mounted at /sys/fs/cgroup 2) each cgroup subsystem activated in the kernel has its own hierarchy mounted under /sys/fs/cgroup. The vserver init scripts will need to be reworked to support this setup. Thanks, William
please try if the following commands fix this issue: mkdir -p /etc/vservers/.defaults/cgroup echo /sys/fs/cgroup > /etc/vservers/.defaults/cgroup/mnt
(In reply to comment #2) I tried, but still not working with openrc-0.9.8.2: # more /etc/vservers/.defaults/cgroup/mnt /sys/fs/cgroup # /etc/init.d/util-vserver start * Creating directories for util-vserver ... [ ok ] * Setting vshelper path to /usr/lib64/util-vserver/vshelper ... [ ok ] * Loading default device map ... [ ok ] * Mounting cgroup-hierarchy ... mount: vserver already mounted or /sys/fs/cgroup busy mount: according to mtab, cgroup_root is already mounted on /sys/fs/cgrou [ !! ] * ERROR: util-vserver failed to start I suppose mount_cgroup() function of /etc/init.d/util-vserver start-up script must be modified to include check if cgroup is already mounted: function mount_cgroup() { _generateCgroupOptions test -n "$CGROUP_MNT" || return 0 $_MKDIR -p "$CGROUP_MNT" $_MOUNT -t cgroup -o "$CGROUP_SUBSYS" vserver "$CGROUP_MNT" } Or later part of /etc/init.d/util-vserver script should take care of it: if [ $? -eq 0 ]; then ebegin "Mounting cgroup-hierarchy" $__PKGLIBDIR/bash-wrapper '_generateCgroupOptions; test -n "$CGR OUP_MNT" || exit 0; $_MKDIR -p "$CGROUP_MNT"; $_MOUNT -t cgroup -o "$CGROUP_SUBS YS" vserver "$CGROUP_MNT"' eend $? fi As William Hubbs alredy correctly mentioned, with openrc-0.9.8.2 cgroup subsystem is really already mounted and visible (was not so in 0.9.4): # df | grep cgroup cgroup_root 10240 0 10240 0% /sys/fs/cgroup br, Jarry
after a quick chet with the util-vserver maintainer, this should help: - upgrade to 0.30.216_pre3004 (just commited, should be near your mirror in about half an hour) - use the two commands above plus: "touch /etc/vservers/.defaults/cgroup/per-ss" if that fixes the issue, i'll commit these config updates to the ebuild so that it works out-of-the-box again.
(In reply to comment #4) > - upgrade to 0.30.216_pre3004 (just commited, should be near your mirror in > about half an hour) > - use the two commands above plus: "touch /etc/vservers/.defaults/cgroup/per-ss" I had the same problem, did the upgrade but the problem didn't get solved. This is output from util-vserver's restart after the upgrade: dedik cgroup # /etc/init.d/util-vserver restart * Caching service dependencies ... [ ok ] * Creating directories for util-vserver ... [ ok ] * Setting vshelper path to /usr/lib64/util-vserver/vshelper ... [ ok ] * Loading default device map ... [ ok ] * Mounting cgroup-hierarchy ... mount: vserver already mounted or /sys/fs/cgroup/cpuset busy mount: according to mtab, cpuset is already mounted on /sys/fs/cgroup/cpuset mount: vserver already mounted or /sys/fs/cgroup/cpu busy mount: according to mtab, cpu is already mounted on /sys/fs/cgroup/cpu mount: vserver already mounted or /sys/fs/cgroup/cpuacct busy mount: according to mtab, cpuacct is already mounted on /sys/fs/cgroup/cpuacct mount: vserver already mounted or /sys/fs/cgroup/memory busy mount: according to mtab, memory is already mounted on /sys/fs/cgroup/memory mount: vserver already mounted or /sys/fs/cgroup/devices busy mount: according to mtab, devices is already mounted on /sys/fs/cgroup/devices mount: vserver already mounted or /sys/fs/cgroup/freezer busy mount: according to mtab, freezer is already mounted on /sys/fs/cgroup/freezer mount: vserver already mounted or /sys/fs/cgroup/blkio busy mount: according to mtab, blkio is already mounted on /sys/fs/cgroup/blkio [ !! ] * ERROR: util-vserver failed to start Or am I missing anything else?
I was in the exact same situation until today. Discussion on IRC resulted in daniel_hozac suggesting the patch from http://paste.linux-vserver.org/20741 This has fixed the issue for me. Looking forward to upstream inclusion and updated ebuild :-)
Shouldn't better the util-vserver script create directory hierarchies as it used to be in /dev/cgroup structure? E.g. /dev/cgroup/<virtual_server>/cpuset for particular vserver and /dev/cgroup/cpuset defined for the whole system? The current script tries to mount everything to /sys/fs/cgroup/cpuset (in the above example with cpuset) for all vservers and the suggested patch only skips that if the directory is already mounted. Doesn't that only cause cgroup limits to be ignored for vservers?
i've added 0.30.216_pre3011 to the tree along with a forced setting of /sys/fs/cgroup in pkg_postinst, so everybody should be good, even with old openrc. please test and report back here. if it works out ok, i'll stabilize it sooner than usual, for obvious reasons :-)
Sorry, 0.30.216_pre3011's util-vserver yields this : * Mounting cgroup-hierarchy ... mount: vserver already mounted or /sys/fs/cgroup/cpuset,cpu,cpuacct,memory,devices,freezer,blkio busy [ !! ] * ERROR: util-vserver failed to start Yet: └─# cat /etc/vservers/.defaults/cgroup/mnt /sys/fs/cgroup └─# ls -lh /etc/vservers/.defaults/cgroup/per-ss -rw-r--r-- 1 root root 0 Feb 17 11:44 /etc/vservers/.defaults/cgroup/per-ss
i've just pushed 0.30.216_pre3025 straight to stable which should take care of any remaining issues. no configuration in /etc/vservers/.defaults is needed!