← Back to issue list

snapcraft.yaml does not allow WatchdogSec for systemd services

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1794814
Type
issue
State
open
Author
~presto88
Labels
Created
Updated
Closed

Current evaluation

Feature request to add a watchdog-sec field to snapcraft.yaml so generated systemd units set WatchdogSec, enabling daemon:notify watchdog restarts. Open ~8 years, no labels, no comments, no maintainer interaction.

Suggested action: needs triage

Reason: The issue has no labels, zero comments, and no maintainer response in ~8 years (last activity 2891 days ago), so it has never been triaged. It is a legitimate feature request (add watchdog-sec to the app schema and emit WatchdogSec in the generated .service file), but I could not verify via tools whether snapcraft now supports this, so a maintainer should confirm current schema support before closing or scoping it.

Impact: 45 Quick Win: 24.75 Staleness: 90 Complexity: 45 Confidence: 55 Support Request: 20

Issue body

Snapcraft allows a "daemon: notify" type which enables the watchdog feature of systemd. However, systemd will not enable the watchdog feature unless the systemd service field "WatchdogSec=x"is present with a non-zero value. The default value if the field is not specified is 0, thus the watchdog feature is disabled. This means that the daemon: notify type is not working at all. I have a daemon process that uses the notify mechanism by sending "WATCHDOG=1" via sd_notify as described in the systemd documentation, https://www.freedesktop.org/software/systemd/man/systemd.service.html When I stop sending the WATCHDOG=1 message, the service should restart automatically. However, it does not restart because the WatchdogSec value has not been provided. Recommendation is to add: watchdog-sec: 5 (example) to snapcraft.yaml which will then generate "WatchDogSec=5" in the [Service] section of the systemd .service file for the snap.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 24.75
Staleness: 90
Complexity: 45
Confidence: 55
Support Request: 20
needs triage Feature request to add a watchdog-sec field to snapcraft.yaml so generated systemd units set WatchdogSec, enabling daemon:notify watchdog restarts. Open ~8 years, no labels, no comments, no maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 10
Confidence: 90
Support Request: 5
needs triage Missing watchdog-sec configuration in snapcraft.yaml prevents systemd watchdog from functioning with daemon: notify. Untriaged and inactive for nearly 8 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 35
Confidence: 90
Support Request: 10
close stale Feature request to add watchdog-sec field to snapcraft.yaml for systemd daemon: notify services. Unlabelled, zero comments, inactive for ~7.8 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 20
Confidence: 70
Support Request: 10
close stale Missing watchdog-sec configuration in snapcraft.yaml prevents systemd watchdog from functioning with daemon: notify. Unlabelled, zero comments, inactive for nearly 8 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 35
Confidence: 80
Support Request: 10
needs triage Request to add watchdog-sec configuration to snapcraft.yaml for systemd services. Unlabelled, zero maintainer interaction, inactive for over 7 years.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.