cgroup-bin package installs with errors (failure to parse /etc/cgconfig.conf)

Bug #681724 reported by James Hunt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libcgroup (Debian)
Fix Released
Unknown
libcgroup (Ubuntu)
Fix Released
High
Serge Hallyn

Bug Description

Binary package hint: cgroup-bin

[james@azul]:~> sudo apt-get install cgroup-bin
[sudo] password for james:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcgroup1
The following NEW packages will be installed
  cgroup-bin libcgroup1
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 83.5kB of archives.
After this operation, 438kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://gb.archive.ubuntu.com/ubuntu/ maverick/universe libcgroup1 i386 0.36.2-3 [32.0kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu/ maverick/universe cgroup-bin i386 0.36.2-3 [51.5kB]
Fetched 83.5kB in 0s (128kB/s)
Selecting previously deselected package libcgroup1.
(Reading database ... 279201 files and directories currently installed.)
Unpacking libcgroup1 (from .../libcgroup1_0.36.2-3_i386.deb) ...
Selecting previously deselected package cgroup-bin.
Unpacking cgroup-bin (from .../cgroup-bin_0.36.2-3_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up libcgroup1 (0.36.2-3) ...
Setting up cgroup-bin (0.36.2-3) ...
Starting cgconfig service: Loading configuration file /etc/cgconfig.conf failed
Cgroup mounting failed
 * Failed to parse /etc/cgconfig.conf
invoke-rc.d: initscript cgconfig, action "start" failed.
dpkg: error processing cgroup-bin (--configure):
 subprocess installed post-installation script returned error exit status 3
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 cgroup-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)

___________________

The contentious file in question ("/etc/cgconfig.conf" -- attached) does exist and was created as part of the install of the cgroup-bin package.

The guts of this file are:

mount {
  cpu = /mnt/cgroups/cpu;
  cpuacct = /mnt/cgroups/cpuacct;
  devices = /mnt/cgroups/devices;
}

Note that /mnt/cgroups/ *has* been created on install of this package, but the cpu, cpuacct and devices subdirectories have not.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: cgroup-bin 0.36.2-3
ProcVersionSignature: Ubuntu 2.6.35-22.35-generic-pae 2.6.35.4
Uname: Linux 2.6.35-22-generic-pae i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Fri Nov 26 10:08:04 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: libcgroup

Revision history for this message
James Hunt (jamesodhunt) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for taking the time to report this bug.

The hierarchy should be created by cgconfigparser, IIUC. However, it is not succeeding. I believe the stock cgconfig is bad.

I'm debugging that right now as part of converting libcgroup to upstart. I hope to have a fix in soon.

Changed in libcgroup (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

In the meantime, given the stock configuration file, what you need is to have a tmpfs mounted under /sys/fs/cgroup. You can add a line to /etc/fstab like:

none /sys/fs/cgroup tmpfs nosuid,nodev 0 0

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Could you try the packages posted in https://bugs.launchpad.net/ubuntu/+source/libcgroup/+bug/644669/comments/2 and let me know if they do what you need?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

This bug is fixed in natty.

libcgroup (0.37.1-1ubuntu1) natty; urgency=low

  * Mount a tmpfs at /sys/fs/cgroup so cgred can create subdirs. Otherwise
    the whole thing fails.
  * Convert to upstart (LP: #644669)
  * add a job to make libvirt (if it is installed and starts) wait until
    cgred is running.

 -- Serge Hallyn <email address hidden> Thu, 17 Feb 2011 18:03:17 -0600

Changed in libcgroup (Ubuntu):
status: Confirmed → Fix Released
Changed in libcgroup (Debian):
status: Unknown → New
Changed in libcgroup (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.