When ovsdb-server or ovs-vswitchd fails and auto-restarts
(Restart=on-failure), it briefly passes through the failed/inactive
state. This causes a cascade: the umbrella service (which Requires
both) sees the failure and stops, which in turn stops the other
service via PartOf. When the failed service comes back, the other
does not automatically restart.
RestartMode=direct (systemd v254+, PR systemd/systemd#27584) makes
the service transition directly to the activating state during
auto-restart, skipping the failed/inactive state. Dependents never
see the failure, so the cascade does not happen.
On older systemd versions the directive is silently ignored with a
harmless journal warning ("Unknown key name 'RestartMode'"), so
this change is safe for all supported platforms. Tested with
containers:
systemd 252 (CentOS Stream 9, Debian 12): warning, ignored
systemd 255 (Ubuntu 24.04): recognized, clean
systemd 256 (CentOS Stream 10): recognized, clean
systemd 257 (Debian 13): recognized, clean
Timothy Redaelli (2):
rhel: Add RestartMode=direct to service units.
debian: Add RestartMode=direct to service units.
debian/openvswitch-switch.ovs-vswitchd.service | 1 +
debian/openvswitch-switch.ovsdb-server.service | 1 +
rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 1 +
rhel/usr_lib_systemd_system_ovsdb-server.service | 1 +
4 files changed, 4 insertions(+)
--
2.54.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev