If /etc/init.d/sysfs mounts its cgroups hierarchy, util-vserver is unable to mount its own hierarchy (and so it fails to start and I am unable to start any vserver). I have to set 'rc_controller_cgroups="NO"' in /etc/rc-conf in order to start util-vserver. If I set 'rc_controller_cgroups="NO"' in /etc/rc-conf util-vserver mounts its cgroups hierarchy but openrc fails to create /sys/fs/cgroup/openrc. Reproducible: Always
can you show a vserver log when it fails to start, and show vserver cgroup options (exactyle directories that vserver creates)
(In reply to comment #1) > can you show a vserver log when it fails to start, and show vserver cgroup > options (exactyle directories that vserver creates) I partially solved the problem by changing from /sys/fs/cgroup (it was set by an old util-vserver ebuild) to /dev/cgroup. *** After booting with 'rc_controller_cgroups="NO"' (util-vserver started): # mount | grep cgroup # mount | grep cgroup cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755) openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc) vserver on /dev/cgroup type cgroup (rw,cpuset,cpu,cpuacct,memory,devices,freezer,blkio,hugetlb) /sys/fs/cgroup/openrc is correctly populated. *** After booting with 'rc_controller_cgroups="YES"': # /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 is already mounted or /dev/cgroup busy [ !! ] * ERROR: util-vserver failed to start # mount | grep cgroup cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755) openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc) cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu) cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct) memory on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) devices on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) freezer on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) blkio on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) hugetlb on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) /dev/cgroup is obviously empty.
I meant: I partially solved the problem by changing */etc/vservers/.defaults/cgroup/mnt* from /sys/fs/cgroup (it was set by an old util-vserver ebuild) to /dev/cgroup.
(In reply to comment #3) > I meant: I partially solved the problem by changing > */etc/vservers/.defaults/cgroup/mnt* from /sys/fs/cgroup (it was set by an > old util-vserver ebuild) to /dev/cgroup. Yes I understood that part, it seems that util-vserver doesn't rely on system when mount cgroups and doesn't check if they already created. Can you set options to: .defaults/cgroup/base -- put "vserver" here .defaults/cgroup/per_ss -- set per service cgroup remove .default/cgroup/mnt file, as openrc itself is populating cgroup filesystem I'm trying to build utils-server for me to verify this issue.
For reference, OpenRC doesn't rely on systemd, but we do try to follow their specification for cgroup management [1], which seems to be the only one that has been written. Is there some reason that vserver can't follow this as well? [1] http://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups
(In reply to comment #4) > Can you set options to: > > .defaults/cgroup/base -- put "vserver" here > .defaults/cgroup/per_ss -- set per service cgroup > remove .default/cgroup/mnt file, as openrc itself is populating cgroup > filesystem > > I'm trying to build utils-server for me to verify this issue. Wonderful, it worked! :) Maybe this howto should be updated: http://www.gentoo.org/proj/en/vps/vserver-howto.xml Or, maybe even better, util-vserver ebuild should set those default values during the post-install phase. Thanks!
Package removed.