Skip to content

Commit

Permalink
devconfig: remove 89-ethernet.network
Browse files Browse the repository at this point in the history
The work on commit 683610d ("debian: install
/etc/systemd/network/89-ethernet.network") tried to do the best we can
with the willy bug present on systemd-networkd-wait-online.service where
if that service is enabled and you have no configuration for ethernet
the service never completes and fails and this can often cause some
services to time out that we may want to setup.

It turns out that adding our own /etc/systemd/network/89-ethernet.network
just to annotate we need dhcp is not sufficient to fix the issue across
all the self-hosted runners used by kdevops. Although many CIs are
not affected one system, the one used for the linux-firmware CI using
the linux-firwmare-kpd kept failing at bringup. Upon closer inspection
on the console, even if we upgraded the host and rebooted into the
latest debian testing packages, the host still had issues. The console
on the guest revealed that the IP address shifted when the file
89-ethernet.network was installed and the server restarted, so the
timeout on bringup was caused because the IP address we obtained first
for ssh-detection changed, so we can no longer connect to the guest.
Strange enough, if you reboot the guest we see the guest afterwards
gets *two* IP addresses assigned!

This is just nuts. So disable systemd-networkd-wait-online.service as
that is completely buggy and I don't think folks really thought this
out well.

Fixes: 683610d ("debian: install /etc/systemd/network/89-ethernet.network")
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
  • Loading branch information
mcgrof committed Nov 23, 2024
1 parent 01b0bdd commit b9e7570
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
8 changes: 1 addition & 7 deletions playbooks/roles/devconfig/tasks/install-deps/debian/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,9 @@
- apt-daily.timer
- apt-daily-upgrade.service
- apt-daily-upgrade.timer
- systemd-networkd-wait-online.service
ignore_errors: yes

- name: Set up 89-ethernet.network
become: yes
become_method: sudo
template:
src: 89-ethernet.network.j2
dest: /etc/systemd/network/89-ethernet.network

- name: Allow for distro source change / upgrade
become: yes
become_flags: 'su - -c'
Expand Down
9 changes: 0 additions & 9 deletions playbooks/roles/devconfig/templates/89-ethernet.network.j2

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/bringup_guestfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,6 @@ uninstall cloud-init
write /etc/default/locale:LANG=en_US.UTF-8
append-line /etc/default/locale:LANGUAGE=en_US:en
write /etc/locale.gen:en_US.UTF-8 UTF-8
write /etc/systemd/network/89-ethernet.network: # kdevops generated 89-ethernet.network
append-line write /etc/systemd/network/89-ethernet.network:# Enable DHCPv4 and DHCPv6 on all physical ethernet links
append-line write /etc/systemd/network/89-ethernet.network:# systemd-networkd-wait-online.service likes to fail on an empty /etc/systemd/network/
append-line write /etc/systemd/network/89-ethernet.network:# and we may leverage systemd-networkd-wait-online.service for other services.
append-line write /etc/systemd/network/89-ethernet.network:[Match]
append-line write /etc/systemd/network/89-ethernet.network:Kind=!*
append-line write /etc/systemd/network/89-ethernet.network:Type=ether
append-line write /etc/systemd/network/89-ethernet.network:[Network]
append-line write /etc/systemd/network/89-ethernet.network:DHCP=yes
firstboot-command locale-gen en_US.UTF-8
firstboot-command update-locale LANG=en_US.UTF-8
firstboot-command DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure -p low --force locales
Expand Down

0 comments on commit b9e7570

Please # to comment.