2023-01-11 20:49:33 |
Alex Zorin |
description |
To my understanding, if the user disables a snap's timer service, it should persist through snap refreshes and reboots. This was discussed at https://forum.snapcraft.io/t/cant-mask-or-disable-snap-services-why-etc-systemd-instead-of-lib-systemd/33385, leading to this bug report.
It seems that both rebooting and refreshing the snap causes the timer to be re-enabled. Reproductions follow.
Case 1: Disabling the timer and rebooting, re-enables the timer:
---
# snap install --classic certbot
# systemctl status snap.certbot.renew.timer
● snap.certbot.renew.timer - Timer renew for snap application certbot.renew
Loaded: loaded (/etc/systemd/system/snap.certbot.renew.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Thu 2023-01-12 07:36:25 AEDT; 49s ago
Trigger: Thu 2023-01-12 21:55:00 AEDT; 14h left
Triggers: ● snap.certbot.renew.service
# snap stop --disable certbot
Stopped.
# snap services certbot
Service Startup Current Notes
certbot.renew enabled inactive timer-activated
# systemctl status snap.certbot.renew.timer
○ snap.certbot.renew.timer - Timer renew for snap application certbot.renew
Loaded: loaded (/etc/systemd/system/snap.certbot.renew.timer; enabled; vendor preset: enabled)
Active: inactive (dead) since Thu 2023-01-12 07:39:03 AEDT; 2min 4s ago
Trigger: n/a
Triggers: ● snap.certbot.renew.service
# reboot
# snap services certbot
Service Startup Current Notes
certbot.renew enabled inactive timer-activated
root@army-p-nutty:~# systemctl list-timers --all | grep -i certbot
Thu 2023-01-12 08:38:00 AEDT 54min left n/a n/a snap.certbot.renew.timer snap.certbot.renew.service
Case 2: Disabling the timer and refreshing it, re-enables the timer:
---
# snap install --classic certbot
# systemctl list-timers --all | grep -i certbot
Thu 2023-01-12 08:38:00 AEDT 51min left n/a n/a snap.certbot.renew.timer snap.certbot.renew.service
# snap stop --disable certbot
Stopped.
# systemctl list-timers --all | grep -i certbot
n/a n/a n/a n/a snap.certbot.renew.timer snap.certbot.renew.service
# snap refresh --beta certbot
certbot (beta) 2.1.1 from Certbot Project (certbot-eff✓) refreshed
# systemctl list-timers --all | grep -i certbot
Thu 2023-01-12 19:37:00 AEDT 11h left n/a n/a snap.certbot.renew.timer snap.certbot.renew.service
# snap services certbot
Service Startup Current Notes
certbot.renew enabled inactive timer-activated
Versions
---
# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
# snap version
snap 2.58
snapd 2.58
series 16
ubuntu 22.04
kernel 5.15.0-1026-oracle |
To my understanding, if the user disables a snap's timer service, it should persist through snap refreshes and reboots. This was discussed at https://forum.snapcraft.io/t/cant-mask-or-disable-snap-services-why-etc-systemd-instead-of-lib-systemd/33385, leading to this bug report.
It seems that both rebooting and refreshing the snap causes the timer to be re-enabled. Reproductions follow.
Case 1: Disabling the timer and rebooting, re-enables the timer:
---
# snap install --classic certbot
# systemctl status snap.certbot.renew.timer
● snap.certbot.renew.timer - Timer renew for snap application certbot.renew
Loaded: loaded (/etc/systemd/system/snap.certbot.renew.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Thu 2023-01-12 07:36:25 AEDT; 49s ago
Trigger: Thu 2023-01-12 21:55:00 AEDT; 14h left
Triggers: ● snap.certbot.renew.service
# snap stop --disable certbot
Stopped.
# snap services certbot
Service Startup Current Notes
certbot.renew enabled inactive timer-activated
# systemctl status snap.certbot.renew.timer
○ snap.certbot.renew.timer - Timer renew for snap application certbot.renew
Loaded: loaded (/etc/systemd/system/snap.certbot.renew.timer; enabled; vendor preset: enabled)
Active: inactive (dead) since Thu 2023-01-12 07:39:03 AEDT; 2min 4s ago
Trigger: n/a
Triggers: ● snap.certbot.renew.service
# reboot
# snap services certbot
Service Startup Current Notes
certbot.renew enabled inactive timer-activated
# systemctl list-timers --all | grep -i certbot
Thu 2023-01-12 08:38:00 AEDT 54min left n/a n/a snap.certbot.renew.timer snap.certbot.renew.service
Case 2: Disabling the timer and refreshing it, re-enables the timer:
---
# snap install --classic certbot
# systemctl list-timers --all | grep -i certbot
Thu 2023-01-12 08:38:00 AEDT 51min left n/a n/a snap.certbot.renew.timer snap.certbot.renew.service
# snap stop --disable certbot
Stopped.
# systemctl list-timers --all | grep -i certbot
n/a n/a n/a n/a snap.certbot.renew.timer snap.certbot.renew.service
# snap refresh --beta certbot
certbot (beta) 2.1.1 from Certbot Project (certbot-eff✓) refreshed
# systemctl list-timers --all | grep -i certbot
Thu 2023-01-12 19:37:00 AEDT 11h left n/a n/a snap.certbot.renew.timer snap.certbot.renew.service
# snap services certbot
Service Startup Current Notes
certbot.renew enabled inactive timer-activated
Versions
---
# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
# snap version
snap 2.58
snapd 2.58
series 16
ubuntu 22.04
kernel 5.15.0-1026-oracle |
|