cgroup-lite can not be installed with systemd

Bug #1312975 reported by RussianNeuroMancer
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
cgroup-lite (Ubuntu)
Fix Released
Medium
Martin Pitt
sysvinit (Debian)
Fix Released
Unknown
sysvinit (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

cgroup-lite can not be installed with systemd due to missing systemd unit or init.d script.

Tags: systemd-boot
tags: added: systemd-boot
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I'm sorry, but I don't know what you mean by a missing upstart service. If you can post a debdiff with the fix I'll happily test and push it, thanks.

Changed in cgroup-lite (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

I mean if systemd is installed and used instead of upstart, then we can not install the package.

Martin Pitt (pitti)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

More concretely, cgroups-mount/umount and the corresponding upstart job aren't necessary at all under systemd. So the only thing to do here is to provide a no-op "placeholder" cgroup-lite.service to satisfy invoke-rc.d.

Changed in cgroup-lite (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

On top of that, invoke-rc.d currently fails if a unit is masked. This needs to be fixed, too.

Changed in sysvinit (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
Changed in cgroup-lite (Ubuntu):
status: In Progress → Fix Committed
Changed in sysvinit (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cgroup-lite - 1.10

---------------
cgroup-lite (1.10) utopic; urgency=medium

  * Add masked dummy cgroup-lite.service to avoid package install/upgrade
    failure when running under systemd. We don't need this job under systemd.
    (LP: #1312975)
 -- Martin Pitt <email address hidden> Mon, 12 May 2014 11:00:59 +0200

Changed in cgroup-lite (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Anders Kaseorg (andersk) wrote :

Even with the fixed invoke-rc.d (sysv-rc 2.88dsf-41ubuntu10 in utopic-proposed), I still can’t upgrade cgroup-lite:

Preparing to unpack .../cgroup-lite_1.10_all.deb ...
Failed to issue method call: Unit cgroup-lite.service not loaded.
invoke-rc.d: initscript cgroup-lite, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 5
dpkg: trying script from the new package instead ...
Failed to issue method call: Unit cgroup-lite.service not loaded.
invoke-rc.d: initscript cgroup-lite, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/cgroup-lite_1.10_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 5
Failed to issue method call: Unit cgroup-lite.service failed to load: No such file or directory. See system logs and 'systemctl status cgroup-lite.service' for details.
invoke-rc.d: initscript cgroup-lite, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
 /var/cache/apt/archives/cgroup-lite_1.10_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: error processing package cgroup-lite (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 cgroup-lite

Revision history for this message
Martin Pitt (pitti) wrote :

This is really a chicken-and-egg problem. We can't upgrade from packages which only have upstart jobs when already running systemd, or at least not with what we have right now. Upgrades need to happen under upstart until packages get fixed for systemd support, and from then on it will work under systemd as well (I tried with --reinstall, and works fine).

Changed in sysvinit (Debian):
status: Unknown → New
Revision history for this message
Anders Kaseorg (andersk) wrote :

When the old package’s prerm fails, dpkg goes back and runs the new package’s prerm instead, to allow us to escape exactly that kind of chicken-and-egg problem. We could, for example, have the new prerm create the cgroup-lite.service → /dev/null symlink if it isn’t already there.

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

This bug was fixed in the package sysvinit - 2.88dsf-41ubuntu10

---------------
sysvinit (2.88dsf-41ubuntu10) utopic; urgency=medium

  * invoke-rc.d: Don't fail on masked services. (LP: #1312975)
 -- Martin Pitt <email address hidden> Mon, 12 May 2014 11:20:50 +0200

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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