cgroup-bin upstart job does not handle the package being removed but not purged properly

Bug #875525 reported by Clint Byrum
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libcgroup (Ubuntu)
Fix Released
High
Unassigned

Bug Description

rc cgroup-bin 0.37.1-1ubuntu3 Tools to control and monitor control groups

The upstart job still tries to mount cgroups, but then fails because /usr/sbin/cgconfigparser is gone.

The pre-start should check for the existence of cgconfigparser before doing anything, and if its not there, exit gracefully.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cgroup-bin (not installed)
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Sat Oct 15 23:55:36 2011
InstallationMedia: Xubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101008.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: libcgroup
UpgradeStatus: Upgraded to oneiric on 2011-07-14 (93 days ago)
mtime.conffile..etc.cgconfig.conf: 2011-06-23T13:15:06.658910

Related branches

Revision history for this message
Clint Byrum (clint-fewbar) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi Clint,

is it really valid to require an upstart job for package X to check that other scripts installed by package X are in fact installed?

If so this is trivial to add, but it seems over the top to worry about the upstart job failing (with no further ill effects on the host, IIUC) if the package is in a bad state. Put another way, you say the upstart job should 'exit gracefully', but really the upstart job should fail under this condition!

(Or have I misunderstood the scenario?)

Changed in libcgroup (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 875525] Re: cgroup-bin upstart job does not handle the package being removed but not purged properly

Excerpts from Serge Hallyn's message of Wed Oct 19 18:38:35 UTC 2011:
> Hi Clint,
>
> is it really valid to require an upstart job for package X to check that
> other scripts installed by package X are in fact installed?
>
> If so this is trivial to add, but it seems over the top to worry about
> the upstart job failing (with no further ill effects on the host, IIUC)
> if the package is in a bad state. Put another way, you say the upstart
> job should 'exit gracefully', but really the upstart job should fail
> under this condition!
>

Its required by policy. Upstart jobs are conffiles, and so are not
removed until a package is *purged*.. even though the binaries are.

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

Jinkeys, so they are. Thanks.

Changed in libcgroup (Ubuntu):
status: Incomplete → Confirmed
importance: Low → Medium
importance: Medium → High
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Clint,

Note that I don't see any other upstart jobs (ssh, libvirt-bin, etc) doing this.

For cgroup-bin, just to make sure I'm understanding right, should it do 'stop; exit 0;' if the binary is not found?

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Excerpts from Serge Hallyn's message of Thu Oct 20 13:40:04 UTC 2011:
> @Clint,
>
> Note that I don't see any other upstart jobs (ssh, libvirt-bin, etc)
> doing this.
>
> For cgroup-bin, just to make sure I'm understanding right, should it do
> 'stop; exit 0;' if the binary is not found?

Err, are you sure ssh doesn't do it?

    test -x /usr/sbin/sshd || { stop; exit 0; }

Thats the first line of the pre-start of ssh.conf. Should do a similar
thing with cgconfigparser.

Changed in libcgroup (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libcgroup - 0.37.1-1ubuntu9

---------------
libcgroup (0.37.1-1ubuntu9) precise; urgency=low

  * Don't run upstart jobs if package has been removed but not purged.
    (LP: #875525)
 -- Serge Hallyn <email address hidden> Wed, 04 Jan 2012 11:11:19 -0600

Changed in libcgroup (Ubuntu):
status: In Progress → 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.