live-server installer: 2 minute timeout on unconnected wired NIC when preferring wifi network config

Bug #1983410 reported by Chad Smith
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned
subiquity (Ubuntu)
New
Undecided
Unassigned

Bug Description

version info:
$ cat /var/log/installer/media-info
Ubuntu-Server 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220801.3)
...
Starting Subiquity server revision 3698

The Ubuntu live server installer makes all NICs (wifi and wired) mandatory in netplan config even when only wifi is configured in the server installer dialogs. This prevents the login prompt from being shown on installed system initial reboot for 2 minutes while awaiting a network online scenario that will not be reached.

The netplan configuration of Wifi and wired NIC set both devices as mandatory for boot, blocking network-online.target for 2 minutes on system installer first reboot delaying cloud-init final setup operations. This 2 minute delay from systemd-analyze blame is also seen on every subsequent reboot of the machine.

This is not a regression with 22.04.1 point release as this behavior exists in 22.04 live installer images as well.

Steps to reproduce:
I have a device (Lenovo T14 laptop) with both an RJ45 jack and an Intel Alder Lake-P WiFi device

When prompted for "Network connections" in the server live installer dialog,

 - No wired connection plugged in, leave NIC configured as "Automatic(DHCP)" (default setting) which reports "not connected" in Notes
 - wifi -> Edit Wifi -> set network name -> set wifi password -> Save

Complete install, reboot into the installed machine to finalize cloud-init configuration:

See log during boot
`A start job is running on Wait for Network to be Configured (42s / no limit)`
# network config job timeout at 2min

Login as user created

csmith@midtown:~$ systemd-analyze
Startup finished in 15.654s (firmware) + 2.245s (loader) + 11.529s (kernel) + 2min 7.511s (userspace) = 2min 36.941s
graphical.target reached after 2min 7.272s in userspace
csmith@midtown:~$ systemd-analyze blame
2min 203ms systemd-networkd-wait-online.service
    3.038s snapd.seeded.service
    1.139s cloud-config.service
    1.079s pollinate.service
     698ms snapd.service
     534ms console-setup.service
     514ms cloud-init.service
     486ms cloud-init-local.service
     459ms snapd.apparmor.service
     330ms dev-mapper-ubuntu\x2d\x2dvg\x2dubuntu\x2d\x2dlv.device
     311ms snap.lxd.activate.service
     259ms systemd-resolved.service
     209ms cloud-final.service
     182ms dev-loop1.device
     182ms dev-loop0.device
     182ms dev-loop2.device
     157ms apparmor.service
     145ms <email address hidden>
     113ms dev-hugepages.mount
     112ms dev-mqueue.mount
     111ms sys-kernel-debug.mount
     109ms sys-kernel-tracing.mount
     106ms lvm2-pvscan@253:0.service
csmith@midtown:~$ cloud-init analyze blame
-- Boot Record 01 --
     00.80000s (modules-config/config-locale)
     00.27600s (init-network/config-ssh)
     00.08400s (modules-config/config-grub-dpkg)
     00.06800s (modules-config/config-set-passwords)
     00.02500s (modules-config/config-apt-configure)
     00.02100s (modules-final/config-keys-to-console)
     00.02100s (init-network/config-users-groups)
     00.00400s (modules-final/config-final-message)
     00.00300s (init-network/consume-user-data)
     00.00100s (modules-final/config-write-files-deferred)
     00.00100s (modules-final/config-ssh-authkey-fingerprints)
     00.00100s (modules-final/config-scripts-per-once)
     00.00100s (modules-final/config-phone-home)
     00.00100s (modules-final/config-install-hotplug)
     00.00100s (modules-final/config-fan)
     00.00100s (modules-config/config-timezone)
     00.00100s (modules-config/config-ssh-import-id)
     00.00100s (init-network/search-None)
     00.00100s (init-network/config-seed_random)
     00.00100s (init-network/config-ca-certs)
     00.00100s (init-network/activate-datasource)
     00.00000s (modules-final/config-ubuntu-drivers)
     00.00000s (modules-final/config-scripts-vendor)
     00.00000s (modules-final/config-scripts-user)
     00.00000s (modules-final/config-scripts-per-instance)
     00.00000s (modules-final/config-scripts-per-boot)
     00.00000s (modules-final/config-salt-minion)
     00.00000s (modules-final/config-rightscale_userdata)
     00.00000s (modules-final/config-reset_rmc)
     00.00000s (modules-final/config-refresh_rmc_and_interface)
     00.00000s (modules-final/config-puppet)
     00.00000s (modules-final/config-power-state-change)
     00.00000s (modules-final/config-package-update-upgrade-install)
     00.00000s (modules-final/config-mcollective)
     00.00000s (modules-final/config-lxd)
     00.00000s (modules-final/config-landscape)
     00.00000s (modules-final/config-chef)
     00.00000s (modules-config/config-ubuntu-advantage)
     00.00000s (modules-config/config-snap)
     00.00000s (modules-config/config-runcmd)
     00.00000s (modules-config/config-ntp)
     00.00000s (modules-config/config-keyboard)
     00.00000s (modules-config/config-disable-ec2-metadata)
     00.00000s (modules-config/config-byobu)
     00.00000s (modules-config/config-apt-pipelining)
     00.00000s (init-network/setup-datasource)
     00.00000s (init-network/consume-vendor-data2)
     00.00000s (init-network/consume-vendor-data)
     00.00000s (init-network/config-write-files)
     00.00000s (init-network/config-update_hostname)
     00.00000s (init-network/config-update_etc_hosts)
     00.00000s (init-network/config-set_hostname)
     00.00000s (init-network/config-rsyslog)
     00.00000s (init-network/config-resizefs)
     00.00000s (init-network/config-mounts)
     00.00000s (init-network/config-migrator)
     00.00000s (init-network/config-growpart)
     00.00000s (init-network/config-disk_setup)
     00.00000s (init-network/config-bootcmd)
     00.00000s (init-network/check-cache)
     00.00000s (init-local/check-cache)

1 boot records analyzed

$ sudo cat /etc/netplan/00-installer-config-wifi.yaml
# This is the network config written by 'subiquity'
network:
  version: 2
  wifis:
    wlp0s20f3:
      access-points:
        AFullhouse-5G:
          password: <redacted>
      dhcp4: true

$ cat /etc/netplan/installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    enp0s31f6:
      optional: true
      dhcp4: true
  version: 2

# Desired behavior
When a network device is not connected during install, maybe the installer should emit "optional: true" in the related /etc/netplan/ config for that interface. It would then avoid lengthy delays on subsequent boots, but still allow the device to be configured for dhcp just in case it is connected.

Tags: fr-2587
Dan Bungert (dbungert)
tags: added: fr-2587
Chad Smith (chad.smith)
description: updated
summary: - live-server installer: 2 minute timeout when prefering wifi network
+ live-server installer: 2 minute timeout when preferring wifi network
config
description: updated
Chad Smith (chad.smith)
summary: - live-server installer: 2 minute timeout when preferring wifi network
- config
+ live-server installer: 2 minute timeout on unconnected wired NIC when
+ preferring wifi network config
Revision history for this message
XSpielinbox (xspielinbox) wrote :

I have the same issue the other way around (reproduced with Ubuntu Server 22.04.1 LTS Installer - Subiquity Version 22.07.2 as well as 22.10.1):
When installing it on a Laptop with an Ethernet adapter, a WiFi and cellular network card, but with the wireless connectivity disabled via hardware-switch the installer recognizes the wireless adapters as disables and configures them as such.
I configured the Ethernet adapter via static IPv4 and static IPv6 and that works, but on every boot there is this 2 minute timeout waiting for the network.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.