Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable watchdog control in systemd #2628

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Enable watchdog control in systemd #2628

merged 1 commit into from
Jul 4, 2023

Conversation

sbyx
Copy link
Contributor

@sbyx sbyx commented Jul 4, 2023

This is a follow-up to #2627 to enable the systemd configuration for dealing with watchdogs. As mentioned in the comments of the last PR this should also enable watchdog handling on RPi where the watchdog driver is already enabled.

@jens-maus
Copy link
Contributor

LGTM. However, as the comment in the system.conf states:

... or by creating "drop-ins" in the system.conf.d/ subdirectory. The latter is generally recommended.

perhaps it would be a better approach to add such a dropin file to system.conf.d subdirectory instead of modifying the default system.conf?

@sbyx
Copy link
Contributor Author

sbyx commented Jul 4, 2023

Due to the squashfs the file will be read-only in the installation anyway so hmm, but no strong preference here anyway.

@agners
Copy link
Member

agners commented Jul 4, 2023

We've previously added a logind.conf in /etc/system directly, but I agree the drop in directories are the nicer approach. In particular this avoids the config file from getting stale as new configs get added in newer systemd variants.

However, I'd go for the distribution location at /usr/lib/systemd/system.conf.d/*.conf

@agners
Copy link
Member

agners commented Jul 4, 2023

Also, can you create two separate PRs for the two things? We might need to revert the enable Watchdog in case it causes problems, and in that case it would be better if its separated from the driver enable PR.

@sbyx
Copy link
Contributor Author

sbyx commented Jul 4, 2023

I removed the watchdog driver here and changed the systemd config into a snippet in /usr/lib/systemd, please check again.

@sbyx sbyx changed the title Enable watchdog control in systemd and add common x86_64 watchdog drivers to kernel Enable watchdog control in systemd Jul 4, 2023
@agners agners added the os label Jul 4, 2023
@agners agners merged commit 6776b23 into home-assistant:dev Jul 4, 2023
@garethhowell
Copy link

garethhowell commented Jan 20, 2024

I know this was done a while back, but what was the reason for setting RuntimeWatchdogUSec=infinity. This disables the watchdog in normal running conditions: i.e. the time when it's most useful (IMHO)

# systemctl show | grep -i watchdog
WatchdogDevice=/dev/watchdog0
WatchdogLastPingTimestamp=Sat 2024-01-20 15:31:54 UTC
WatchdogLastPingTimestampMonotonic=1510421697
RuntimeWatchdogUSec=infinity
RuntimeWatchdogPreUSec=0
RebootWatchdogUSec=10min
KExecWatchdogUSec=0
ServiceWatchdogs=yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants