Project

General

Profile

Actions

Bug #12720

closed

systemd unit files should be compatible with older systemd versions

Added by Tom Clegg over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
-
Story points:
-

Description

Our systemd unit files say this:

# systemd<230
StartLimitInterval=0
# systemd>=230
StartLimitIntervalSec=0

This works on systemd≥230 (it ignores StartLimitInterval) but fails on systemd<230.

These systemd files get installed automatically by our packages, so anyone using an older systemd needs to un-break them after each package install/upgrade.

Propose using StartLimitBurst instead:

StartLimitBurst=12

This option didn't get renamed like StartLimitInterval[Sec] did, so it should work on all systems. We already specify RestartSec=1 and the default configuration is StartLimitInterval[Sec]=10 (unless the OS vendor or sysadmin has changed it of course), so StartLimitBurst=12 should prevent systemd from reaching the "stay down until manual intervention" state.

A different (less trivial) solution would be for all services to implement "pause and retry if dependencies fail" logic internally, rather than relying on systemd to supervise them. This way systemd would report the services as "alive" the whole time, and the sysadmin could no longer rely on generic systemd-based tools for logging/alerting about restarts, fwiw.

Actions

Also available in: Atom PDF