snap update causes disabled maas systemd service to start again
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Alberto Donato | ||
2.7 |
Fix Released
|
Medium
|
Alberto Donato | ||
snapd |
Invalid
|
Undecided
|
Ian Johnson |
Bug Description
If you stop/disable the systemd service for the MAAS snap, an automatic snap update or snap refresh causes it to start again - though it still shows as disabled.
I would expect the snap to maintain the disabled/enabled state of the service and ideally also the currently stopped/started state of the service.
During a maintenance period, etc.. an automatic snap update could happen at any time even in a small window of expecting systemctl disable/stop to work.
= Reproduction steps =
snap install maas --stable
systemctl disable snap.maas.
systemctl stop snap.maas.
systemctl status snap.maas.
snap refresh maas --edge
systemctl status snap.maas.
= Example output =
● snap.maas.
Loaded: loaded (/etc/systemd/
Active: active (running) since Wed 2020-03-25 09:29:13 AWST; 25min ago
Related branches
- Alberto Donato (community): Approve
-
Diff: 26 lines (+16/-0)1 file modifiedsnap/hooks/install (+16/-0)
- Björn Tillenius: Approve
- MAAS Lander: Needs Fixing
-
Diff: 27 lines (+16/-0)1 file modifiedsnap/hooks/install (+16/-0)
- MAAS Lander: Approve
- MAAS Maintainers: Pending requested
-
Diff: 13 lines (+0/-3)1 file modifiedsnap/hooks/install (+0/-3)
- Björn Tillenius: Approve
- MAAS Lander: Approve
-
Diff: 36 lines (+2/-6)2 files modifiedsnap/hooks/install (+2/-4)
snap/local/tree/bin/run-supervisord (+0/-2)
Changed in snapd: | |
assignee: | nobody → Ian Johnson (anonymouse67) |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 2.8.0b1 |
assignee: | nobody → Alberto Donato (ack) |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
I would also argue that a snap update should not start a stopped service. I think dh_systemd also attempts to handle this though I might be wrong.