Support installing subordinate systemd on Ubuntu Desktop 14.04.5

Bug #1656280 reported by Dimitri John Ledkov
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Trusty
Fix Released
High
Dimitri John Ledkov

Bug Description

Add support for installing deputy systemd for snapd on Ubuntu Desktop 14.04.5

When installed, deputy systemd provides a subset of functionality as required for snapd:
* Providing necessary units for power management via systemctl
* Provides private socket API access (and thus systemctl as root) only, and is not present on the system D-Bus
* Does not conflict with systemd-shim
* Does not change behaviour of systemd-services nor udeb build in anyway

[Impact]

 * Users can install snapd without regressing Desktop support, lxc/lxc1/lxd abilities.

[Test Case]

 * Power management works (e.g. shutdown/reboot via indicator-system and via systemctl)

 * Timedatectl commands report NTP status enable/disabled correctly, and can change it

 * Can install and use snapd

 * Can install and use lxc / lxc1 / lxd

[Regression Potential]

 * Minimal, as bin:systemd uses a separate build in the package with additional patches to not intefere with cgmanager's name=systemd cgroup; and instead deputy bin:systemd uses name=dsystemd cgroup for process management.

no longer affects: systemd (Ubuntu Xenial)
Changed in systemd (Ubuntu Trusty):
status: New → Triaged
Changed in systemd (Ubuntu):
status: New → Invalid
Changed in systemd (Ubuntu Trusty):
importance: Undecided → High
milestone: none → ubuntu-14.04.5
description: updated
Changed in systemd (Ubuntu Trusty):
assignee: nobody → Dimitri John Ledkov (xnox)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Slight change of implementation; indicator-datetime nor xorg-server-lts-xenial srus are no longer strictly needed (even though both are correct)

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Updated description to match the latest state of affairs.

description: updated
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Changed in systemd (Ubuntu Trusty):
status: Triaged → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote :

The changelog says:

  * debian/patches/deputy_cgroup.patch: Make deputy systemd use
    alternative dsystemd cgroups path and nonpid1 systemd should setup
    these mountpoints.

Does this refer to mounting of /sys/fs/cgroup/dsystemd or of /sys/fs/cgroup/systemd? Are changes needed to some other package to support this?

Changed in systemd (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Dimitri, or anyone else affected,

Accepted systemd into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/204-5ubuntu20.22 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Dave Morley (davmor2) wrote :

I have tested this fix, I can run lxc1 from backports, lxd from backports and lxc from stable. I can also install and run snaps as expected. I have also had no ill affects from using this version of systemd.

tags: added: verification-done
removed: verification-needed
Mathew Hodson (mhodson)
no longer affects: systemd (Ubuntu)
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 1656280] Re: Support installing subordinate systemd on Ubuntu Desktop 14.04.5

On 26 January 2017 at 05:19, Steve Langasek
<email address hidden> wrote:
>
> The changelog says:
>
> * debian/patches/deputy_cgroup.patch: Make deputy systemd use
> alternative dsystemd cgroups path and nonpid1 systemd should setup
> these mountpoints.
>
> Does this refer to mounting of /sys/fs/cgroup/dsystemd or of
> /sys/fs/cgroup/systemd? Are changes needed to some other package to
> support this?
>

Note, there is a new build flavour added.

bin:systemd-services use "systemd" cgroup (/sys/fs/cgroup/systemd
mount) is "owned" and mounted by cgmanager (if installed/needed)

bin:systemd (deputy systemd build) uses "dsystemd" cgroup
(/sys/fs/cgroup/dsystemd) is "owned" and mounted by deputy systemd

There should not be any changes to packages required to support this, as
(a) everything "normal" should be using the cgmanager's standard cgroup
(b) deputy systemd cgroup should be manipulated via deputy systemd
only (e.g. with systemctl, like snapd) and that uses the dsystemd
cgroup.

--
Regards,

Dimitri.

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

This bug was fixed in the package systemd - 204-5ubuntu20.22

---------------
systemd (204-5ubuntu20.22) trusty; urgency=medium

  * Add support for installing deputy systemd for snapd on Ubuntu
    Desktop 14.04.5 (LP: #1656280)

  [ Dimitri John Ledkov ]
  * debian/patches/deputy_shutdown.patch: Use system poweroff, halt,
    reboot, pm-suspend, pm-hibernate commands in the systemd units for
    power management via systemd/systemctl. Use /bin/false for kexec.
  * debian/systemd.postinst: Drop restaring systemd-initctl.socket and
    systemd-logind.service, as neither are supposed to be managed by
    deputy systemd.
  * debian/patches/deputy_cgroup.patch: Make deputy systemd use
    alternative dsystemd cgroups path and nonpid1 systemd should setup
    these mountpoints.
  * debian/patches/private-bus-for-nonpid1.patch: Make deputy systemd not
    connect to system D-Bus, to avoid conflict with systemd-shim.
  * debian/control: remove conflicts with systemd-shim

  [ Thomas Voß ]
  * debian/patches/add-cgmanager-support: Only free result if != NULL,
    preventing crash in the error handling code-path.

 -- Dimitri John Ledkov <email address hidden> Tue, 17 Jan 2017 10:43:30 +0000

Changed in systemd (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for systemd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.