Switch systemd-networkd off on guests that configure nothing for it #74

Merged
kevinheyer merged 1 commit from networkd-off into main 2026-11-25 08:06:18 +01:00
Member

Fixes the cause of iac-core#45 (refs, the issue stays open until verified on a guest).

apt-helper wait-online (ExecStartPre of apt-daily and apt-daily-upgrade) runs systemd-networkd-wait-online whenever systemd-networkd is active. On guests with ifupdown or a Proxmox-managed interface networkd is disabled but socket-activated, manages no link, and the wait ends in a timeout and a journal error (compliance: every run since 2026-11-18).

iac_baseline now stops and masks systemd-networkd.socket and .service when there is no .network file in /etc/systemd/network or /run/systemd/network. Guests with their own networkd configuration keep it. Not in the image build; a VM gets it at first boot, an existing guest at update.

Tested: tools/lint.sh; dev container of iac-example twice (first run masks both units, second run changes nothing).
Not tested: a Proxmox LXC guest (networkd does not start in Docker, the timeout was not reproduced), check-all-apps.sh --sample.

🤖 Generated with Claude Code

https://claude.ai/code/session_014Px55FVUdXiuWr642SZTHK

Fixes the cause of iac-core#45 (refs, the issue stays open until verified on a guest). `apt-helper wait-online` (ExecStartPre of apt-daily and apt-daily-upgrade) runs `systemd-networkd-wait-online` whenever `systemd-networkd` is active. On guests with ifupdown or a Proxmox-managed interface networkd is `disabled` but socket-activated, manages no link, and the wait ends in a timeout and a journal error (compliance: every run since 2026-11-18). `iac_baseline` now stops and masks `systemd-networkd.socket` and `.service` when there is no `.network` file in `/etc/systemd/network` or `/run/systemd/network`. Guests with their own networkd configuration keep it. Not in the image build; a VM gets it at first boot, an existing guest at `update`. Tested: `tools/lint.sh`; dev container of iac-example twice (first run masks both units, second run changes nothing). Not tested: a Proxmox LXC guest (networkd does not start in Docker, the timeout was not reproduced), `check-all-apps.sh --sample`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014Px55FVUdXiuWr642SZTHK
Switch systemd-networkd off on guests that configure nothing for it
All checks were successful
/ lint (pull_request) Successful in 17s
/ lint (push) Successful in 11s
fbf35a895b
Guests get their network from ifupdown or Proxmox, but networkd stays
socket-activated and starts on any networkctl or varlink call. While it
is active, apt-helper wait-online (ExecStartPre of apt-daily and
apt-daily-upgrade) runs systemd-networkd-wait-online, which waits for a
link networkd never manages, times out and logs an error. compliance
logged it on every run since 2026-11-18. Mask the socket and the service
when there is no .network file in /etc/systemd/network or
/run/systemd/network.

Tested: tools/lint.sh passes; dev container of iac-example, two runs: the
first masks both units, the second changes nothing, networkd is inactive
and apt-helper wait-online returns at once. Not tested: a Proxmox LXC –
networkd does not start in the Docker container, so the timeout itself
was not reproduced there.
Author
Member

tools/check-all-apps.sh --sample auf dem Branch networkd-off (fbf35a8): 5 von 5 Apps grün (blume, jellyfin, nginx, romm, vikunja; je zwei Läufe, idempotent). Alles nur LXC-ähnliche Dev-Container: ob der Timeout auf einem echten Proxmox-LXC verschwindet, ist weiter ungeprüft.

`tools/check-all-apps.sh --sample` auf dem Branch `networkd-off` (fbf35a8): 5 von 5 Apps grün (blume, jellyfin, nginx, romm, vikunja; je zwei Läufe, idempotent). Alles nur LXC-ähnliche Dev-Container: ob der Timeout auf einem echten Proxmox-LXC verschwindet, ist weiter ungeprüft.
Sign in to join this conversation.
No description provided.