systemd units should not be placed in /etc/systemd (cannot mask a service)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Medium
|
Unassigned |
Bug Description
snapd should not place generated unit files in /etc/systemd and instead place them in another location.
The systemd documentation notes under the "Table 1. Load path when running in system mode (--system)." section of https:/
/usr/local/
/usr/lib/
run/systemd/
In practice this causes problems, for example "systemctl mask" does not work:
root@skc:~# systemctl mask snap.maas.
Failed to mask unit: File /etc/systemd/
There are 2 main solutions I envisage to this problem. Firstly it should just install them to the normal package manager location of /usr/lib/
Secondly a potentially better or alternative solution would be to harness the systemd.generator functionality which is natively designed to have "non-native" configuration converted to systemd units - and is automatically run on boot and daemon-reload (which is required to pickup generated config files anyway). And would store them in the above generator location instead.
Documentation: https:/
This was discovered when looking for a workaround to Bug #1868908 snap update causes disabled systemd service to start again
tags: | added: seg |
Changed in snapd: | |
importance: | Undecided → Medium |
status: | New → Triaged |