Skip to content

Commit

Permalink
release: Configure default SYSTEMD_NETLINK_DEFAULT_TIMEOUT
Browse files Browse the repository at this point in the history
Write a drop-in for the systemd-networkd service that sets the
SYSTEMD_NETLINK_DEFAULT_TIMEOUT environment variable to "infinity",
rather than use the default timeout of 25 seconds.  This ensures that
systemd-networkd won't put links into an inoperable state if the
kernel/system is heavily loaded and doesn't respond right away.
  • Loading branch information
zmrow committed Oct 11, 2023
1 parent 2cbd63d commit 0ac35ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/release/release.spec
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Source1080: runtime.slice
# Drop-in units to override defaults
Source1100: systemd-tmpfiles-setup-service-debug.conf
Source1101: systemd-resolved-service-env.conf
Source1102: systemd-networkd-service-env.conf

# systemd-udevd default link
Source1200: 80-release.link
Expand Down Expand Up @@ -167,6 +168,10 @@ install -d %{buildroot}%{_cross_unitdir}/systemd-resolved.service.d
install -p -m 0644 %{S:1101} \
%{buildroot}%{_cross_unitdir}/systemd-resolved.service.d/00-env.conf

install -d %{buildroot}%{_cross_unitdir}/systemd-networkd.service.d
install -p -m 0644 %{S:1102} \
%{buildroot}%{_cross_unitdir}/systemd-networkd.service.d/00-env.conf

LOWERPATH=$(systemd-escape --path %{_cross_sharedstatedir}/kernel-devel/.overlay/lower)
sed -e 's|PREFIX|%{_cross_prefix}|' %{S:1020} > ${LOWERPATH}.mount
install -p -m 0644 ${LOWERPATH}.mount %{buildroot}%{_cross_unitdir}
Expand Down Expand Up @@ -251,6 +256,8 @@ ln -s preconfigured.target %{buildroot}%{_cross_unitdir}/default.target
%{_cross_unitdir}/[email protected]
%dir %{_cross_unitdir}/systemd-resolved.service.d
%{_cross_unitdir}/systemd-resolved.service.d/00-env.conf
%dir %{_cross_unitdir}/systemd-networkd.service.d
%{_cross_unitdir}/systemd-networkd.service.d/00-env.conf
%dir %{_cross_unitdir}/systemd-tmpfiles-setup.service.d
%{_cross_unitdir}/systemd-tmpfiles-setup.service.d/00-debug.conf
%dir %{_cross_templatedir}
Expand Down
2 changes: 2 additions & 0 deletions packages/release/systemd-networkd-service-env.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Service]
Environment=SYSTEMD_NETLINK_DEFAULT_TIMEOUT=infinity

0 comments on commit 0ac35ed

Please sign in to comment.