Package does not contain service file

Bug #1405256 reported by Ivan
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
libcgroup (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After installing cgroup-bin in Ubuntu 14.04 (LTS) I tried to start the service, but there's no service file:

ivan@ivan-ubuntu:~$ sudo service cgconfig status
cgconfig: unrecognized service
ivan@ivan-ubuntu:~$

There's an answer in Ask Ubuntu that suggests that the package is broken and worked in previous versions, here:
http://askubuntu.com/questions/528258/why-is-cgconfig-conf-not-being-read-on-reboot-on-14-04/529636#529636

Thank you.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libcgroup (Ubuntu):
status: New → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1405256] Re: Package does not contain service file

Please tell us which features of libcgroup you need. Is it
only the initial configuration of cgroups?

Revision history for this message
Ivan (ivanglima) wrote :

Hi! Thank you for looking into this.

The initial configuration and cgrules.conf.

On Wed, Jan 7, 2015 at 6:15 PM, Serge Hallyn <email address hidden>
wrote:

> Please tell us which features of libcgroup you need. Is it
> only the initial configuration of cgroups?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1405256
>
> Title:
> Package does not contain service file
>
> Status in libcgroup package in Ubuntu:
> Confirmed
>
> Bug description:
> After installing cgroup-bin in Ubuntu 14.04 (LTS) I tried to start the
> service, but there's no service file:
>
> ivan@ivan-ubuntu:~$ sudo service cgconfig status
> cgconfig: unrecognized service
> ivan@ivan-ubuntu:~$
>
> There's an answer in Ask Ubuntu that suggests that the package is broken
> and worked in previous versions, here:
>
> http://askubuntu.com/questions/528258/why-is-cgconfig-conf-not-being-read-on-reboot-on-14-04/529636#529636
>
> Thank you.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/libcgroup/+bug/1405256/+subscriptions
>

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

So I think long term (i.e. 16.04 and later) this will become a job for
systemd. What I'm not sure about is whether in the meantime we want
to implement another generic way of achieving this, or simply show
how to do it manually. I personally think the simplest thing to do
would be to create an upstart job that creates the cgroups you want.
For instances if you want a Web cgroup in the memory, cpuset, and
freezer hierarchies, owned by uid 100, with certain constraints, and you
have cgmanager and cgmanager-utils installed, you could create
/etc/init/setup-cgroups.conf containing (untested):

description "set up initial cgroups"
task
start on started cgmanager

script
 cgm movepidabs all / $$
 cgm create freezer Web
 cgm create memory Web
 cgm create cpuset Web
 cgm setvalue cpuset Web cpuset.cpus "0-1"
 cgm setvalue cpuset Web cpuset.mems "0"
 cgm chown freezer Web 1000 1000
 cgm chown memory Web 1000 1000
 cgm chown cpuset Web 1000 1000
end script

Revision history for this message
Ivan (ivanglima) wrote :

From what I understand (which is not much) from the link I originally
posted, it seems to me that an older version of the package worked and
contains the necessary files. Isn't it possible to just add these missing
files to the current version of the package?

IMO even if in the next version of Ubuntu this will be replaced, this is
still an LTS version (14.04), so I think it should be fixed.

Thanks!

On Sat, Jan 10, 2015 at 2:23 PM, Serge Hallyn <email address hidden>
wrote:

> So I think long term (i.e. 16.04 and later) this will become a job for
> systemd. What I'm not sure about is whether in the meantime we want
> to implement another generic way of achieving this, or simply show
> how to do it manually. I personally think the simplest thing to do
> would be to create an upstart job that creates the cgroups you want.
> For instances if you want a Web cgroup in the memory, cpuset, and
> freezer hierarchies, owned by uid 100, with certain constraints, and you
> have cgmanager and cgmanager-utils installed, you could create
> /etc/init/setup-cgroups.conf containing (untested):
>
> description "set up initial cgroups"
> task
> start on started cgmanager
>
> script
> cgm movepidabs all / $$
> cgm create freezer Web
> cgm create memory Web
> cgm create cpuset Web
> cgm setvalue cpuset Web cpuset.cpus "0-1"
> cgm setvalue cpuset Web cpuset.mems "0"
> cgm chown freezer Web 1000 1000
> cgm chown memory Web 1000 1000
> cgm chown cpuset Web 1000 1000
> end script
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1405256
>
> Title:
> Package does not contain service file
>
> Status in libcgroup package in Ubuntu:
> Confirmed
>
> Bug description:
> After installing cgroup-bin in Ubuntu 14.04 (LTS) I tried to start the
> service, but there's no service file:
>
> ivan@ivan-ubuntu:~$ sudo service cgconfig status
> cgconfig: unrecognized service
> ivan@ivan-ubuntu:~$
>
> There's an answer in Ask Ubuntu that suggests that the package is broken
> and worked in previous versions, here:
>
> http://askubuntu.com/questions/528258/why-is-cgconfig-conf-not-being-read-on-reboot-on-14-04/529636#529636
>
> Thank you.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/libcgroup/+bug/1405256/+subscriptions
>

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

The upstart job I posted demonstrates that you can still do it pretty
easily. Note that libcgroup is in universe, is no longer maintained,
and was always buggy by design. If we simply re-enable the part that
you want to use, it won't work well in a large number of cases.

Another simpler solution would be to take the precise package and
build it in a ppa for trusty. You would then be able to use it
from there.

Revision history for this message
Shuhao (shuhao) wrote :

Does this mean libcgroup will not be maintained for the future (15.05, 16.04LTS and beyond?). Also what do you mean by "buggy"?

Revision history for this message
Peter Schüller (schueller-p) wrote :

So what is the new recommended way to setup cgroups that should always exist even after a reboot?

I found a lot of documentation about cgroups.conf but it simply does not work on 14.04.

Or are cgroups generally a concept that is being abandoned? Is there an alternative method to limit resources?

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

Quoting Peter Schüller (<email address hidden>):
> So what is the new recommended way to setup cgroups that should always
> exist even after a reboot?

Currently the recommended way in 15.04 is to use systemd to create
the cgroups (i.e. see http://www.freedesktop.org/software/systemd/man/systemd.resource-control.html)

We will be discussing and designing the next steps at the next Ubuntu
Online Summit. This should include how to respond to changing resources
(i.e. cpu hotplug) as well as more administrator-controlled cgroups,
which is what (if I understand correctly0 you want.

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.