snapd should allow snaps to define systemd unit alias names

Bug #1626986 reported by Simon Fels on 2016-09-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

To allow us to replace services which where formerly provided by debs we need something in snapd which can add and Alias= field to the create systemd unit file.

This would allow us for example for the network-manager snap to replace the deb based version and all other service depending on the NetworkManager.service unit can still work as the snap service file now has an Alias=NetworkManager.service field.

See for some more details.

Jamie Strandboge (jdstrand) wrote :

How would we prevent a snap from replace another snap's name? Would this be a reserved declaration? Would that be supported in a snap declaration (ie, "this snap is allowed to alias NetworkManager, but not bluez)?

Martin Pitt (pitti) wrote :

Sprinkling a lot of hacky patches like into Ubuntu is not the right way forward -- if we want to provide plumbing services like NetworkManager, bluez, or cups as snaps, then they need to be able to assume the expected service unit and D-Bus .service files. Let's rather do this properly via a declarative alias than hardcoding dynamically generated (!) snap service names in unrelated code.

These snaps need to be manually reviewed anyway as they have a lot of privileges and provide central services to both the OS itself and to other snaps.

summary: - snapd should allows snaps to define systemd unit Alias names
+ snapd should allow snaps to define systemd unit alias names
Zygmunt Krynicki (zyga) on 2019-09-27
affects: snappy → snapd
Changed in snapd:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers