Skip to content

Commit c719ef8

Browse files
committed
cidata: mark slirp NIC as optional to fix ubuntu-26.04 first-boot delay
On ubuntu-26.04, systemd-networkd-wait-online is configured by netplan to wait for eth0 before it exists. On first boot the NIC is still enp0s1 — the udev rename hasn't happened yet — causing a 120s timeout. Marking the slirp NIC as optional (netplan optional: true -> RequiredForOnline=no in systemd-networkd) tells wait-online to not block on eth0, so boot completes immediately. The interface is still renamed to eth0 after boot, preserving existing behaviour for all other tools. Fixes: #4792 Signed-off-by: Ramadhan Gerry Akbar <ramadhan.gerry@gmail.com>
1 parent 2d4314e commit c719ef8

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

hack/test-templates.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ if [[ -n ${CHECKS["proxy-settings"]} ]]; then
229229
got=$(limactl shell "$NAME" env | grep FTP_PROXY)
230230
# Expected: FTP_PROXY is set in addition to ftp_proxy, localhost is replaced
231231
# by the gateway address, and the value is set immediately without a restart
232-
gatewayIp=$(limactl shell "$NAME" ip route show 0.0.0.0/0 dev eth0 | cut -d\ -f3)
232+
gatewayIp=$(limactl shell "$NAME" ip route show 0.0.0.0/0 | awk '{print $3; exit}')
233233
expected="FTP_PROXY=http://${gatewayIp}:2121"
234234
INFO "FTP_PROXY: expected=${expected} got=${got}"
235235
if [ "$got" != "$expected" ]; then

pkg/cidata/cidata.TEMPLATE.d/network-config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ ethernets:
55
match:
66
macaddress: '{{$nw.MACAddress}}'
77
dhcp4: true
8+
{{- if eq $nw.Interface $.SlirpNICName }}
9+
optional: true
10+
{{- end }}
811
set-name: {{$nw.Interface}}
912
dhcp4-overrides:
1013
route-metric: {{$nw.Metric}}

0 commit comments

Comments
 (0)