Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634630 - app-admin/cgmanager-0.41: Error mounting unified: No such file or directory
Summary: app-admin/cgmanager-0.41: Error mounting unified: No such file or directory
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-18 12:27 UTC by José Pekkarinen
Modified: 2018-02-26 13:16 UTC (History)
3 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 José Pekkarinen 2017-10-18 12:27:00 UTC
Hi,

I've been running a setup with unprivileged containers for a while. Recent upgrades made lxd work awkwardly and it narrows down to this issue, cgmanager 
not starting, because not mounting unified. I'm using openrc, and this is how
subuid and subgid files looks like:

mongodb:100000:65536
nullmail:165537:65536
games:231073:65536
tcpdump:296609:65536
ntp:362145:65536
qemu:427681:65536
<myuser>:500000:65536
nm-openconnect:565536:65536
nm-openvpn:631072:65536
dnsmasq:696608:65536
rtkit:762144:65536
squid:827680:65536
radvd:893216:65536
root:1000000:65536
distcc:1065536:65536
tss:1131072:65536
nginx:1196608:65536
geoclue:1262144:65536
quassel:1327680:65536
tor:1393216:65536
privoxy:1458752:65536

# diff /etc/subuid /etc/subgid
#

Thanks!

José.
Comment 1 José Pekkarinen 2017-10-18 12:28:22 UTC
The output here:

# cgmanager -m name=systemd
cgmanager: Error mounting unified: No such file or directory

cgmanager: failed to collect cgroup subsystems
Comment 2 José Pekkarinen 2017-10-18 12:29:10 UTC
# emerge --info
Portage 2.3.8 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-5.4.0, glibc-2.23-r4, 4.13.5+ x86_64)
=================================================================
System uname: Linux-4.13.5+-x86_64-Intel-R-_Core-TM-_i7-6500U_CPU_@_2.50GHz-with-gentoo-2.4.1
KiB Mem:    16130592 total,   3312428 free
KiB Swap:   11010040 total,  11010040 free
Timestamp of repository gentoo: Wed, 18 Oct 2017 10:00:01 +0000
Head commit of repository gentoo: 8798bf91e5d2965f4abf802302769ff3a196a6a7
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.4::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.32.1::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.28.1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

foxiverlay
    location: /home/pekkari/foxiverlay
    masters: gentoo
    priority: 50

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

qt
    location: /var/lib/layman/qt
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -mtune=native -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -mtune=native -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://trumpetti.atm.tut.fi/gentoo/ rsync://gentoo.bloodhost.ru/gentoo-distfiles"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j10 -l5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus declarative dri dts dvd dvdr egl emboss encode exif fam firefox flac fortran gdbm gif glamor gles2 gpm iconv icu ipv6 jack jpeg kde kipi kwallet lcms ldap libnotify lm_sensors mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opencl opengl openmp pam pango pcre pdf phonon php pkcs11 plasma png policykit ppds qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session smartcard spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vdpau vhost-net vorbis wayland wayland-compositor widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext mpx popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-GB fi es" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 John 2017-10-19 22:05:58 UTC
I have the same issue with cgmanager!
Comment 4 José Pekkarinen 2017-10-21 05:06:30 UTC
As stated upstream this seems not to be fixed by cgmanager anymore, as it's deprecated.

https://github.com/lxc/cgmanager/issues/34
Comment 5 José Pekkarinen 2017-10-22 19:41:27 UTC
Seems like support of cgroups v2 is landed in openrc for 0.32 that is already
the stable version, so dropping cgmanager and configuring openrc properly may
clean this issue. More info bellow:

https://github.com/OpenRC/openrc/issues/94
Comment 6 José Pekkarinen 2017-10-23 05:19:48 UTC
Uncommenting:

rc_cgroup_mode="hybrid"
rc_controller_cgroups="YES"

And manually mounting the systemd cgroup as stated below does the trick for me:

https://wiki.gentoo.org/wiki/LXC#Mounted_cgroup_filesystem

I'm looking for a way to automate the cgroup mount on boot. If you happen
to know any, please let me know.

Thanks!

José.
Comment 7 José Pekkarinen 2017-10-23 07:17:17 UTC
Following tip may allow to forget about this issue:

https://forums.gentoo.org/viewtopic-t-1042340-start-0.html

Thanks!

José.
Comment 8 Maciej S. Szmigiero 2017-11-01 16:06:00 UTC
FYI: I've created a pull request against the cgmanager repository with a patch
fixing cgroups v2 mount issue: https://github.com/lxc/cgmanager/pull/35

Further patches fixing various issues with cgroups v2 handling in cgmanager will follow soon.
Comment 9 Maciej S. Szmigiero 2017-11-16 23:35:15 UTC
The fix for cgmanager unified (v2) hierarchy mount issue have now been
merged by that project upstream.
Other patches are needed, however, before v2 support in cgmanager works sensibly
(I've created an another pull request with them).

(In reply to José Pekkarinen from comment #5)
> Seems like support of cgroups v2 is landed in openrc for 0.32 that is already
> the stable version, so dropping cgmanager and configuring openrc properly may
> clean this issue.

OpenRC won't create session cgroups for every user that logs in, so no, dropping
cgmanager is not an option (at least for now).

Also note that OpenRC currently do not directly support any cgroup configuration
that is more complicated than putting every service in a separate cgroup, with
a hardcoded name, that is a direct child of root cgroups (I've created a pull
request - https://github.com/OpenRC/openrc/pull/183 - to make it a bit more
flexible).

(In reply to José Pekkarinen from comment #7)
> Following tip may allow to forget about this issue:
> 
> https://forums.gentoo.org/viewtopic-t-1042340-start-0.html

Note that libcgroup used in this tip do not support the v2 hierarchy.

But creating a new cgroup is a simple thing - it is just one mkdir that can be
done for example by a shell script placed in /etc/local.d/.