Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 458480 - sys-cluster/util-vserver with sys-apps/openrc - conflict in cgroups management
Summary: sys-cluster/util-vserver with sys-apps/openrc - conflict in cgroups management
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Patrice Clement (RETIRED)
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks: 585746
  Show dependency tree
 
Reported: 2013-02-20 15:17 UTC by Ivan Iraci
Modified: 2019-04-13 06:58 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Iraci 2013-02-20 15:17:38 UTC
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
Comment 1 Alexander Vershilov (RETIRED) gentoo-dev 2013-02-20 16:30:03 UTC
can you show a vserver log when it fails to start, and show vserver cgroup options (exactyle directories that vserver creates)
Comment 2 Ivan Iraci 2013-02-21 15:14:02 UTC
(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.
Comment 3 Ivan Iraci 2013-02-21 15:15:11 UTC
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.
Comment 4 Alexander Vershilov (RETIRED) gentoo-dev 2013-02-26 12:39:14 UTC
(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.
Comment 5 William Hubbs gentoo-dev 2013-02-26 17:55:18 UTC
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
Comment 6 Ivan Iraci 2013-02-27 09:08:52 UTC
(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!
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-04-13 06:58:45 UTC
Package removed.