Sorry if the above comment wasn't super friendly. I've gone ahead and
asked ChatGPT to help and it gave perfect steps to reproduce. As the
user that was affected by this bug I can confirm that the steps ChatGPT
describes here are in agreement with my memory of what happened to
produce this bug:
Prompt:
Hi ChatGPT. I have a bug report here for an issue in the Ubuntu cloud-
init package. Do you think you could please figure out what steps would
be required to reproduce this bug? Here is the report:
Installed a new graphics card on an Ubuntu Server machine. Suddenly
internet stopped working. Spent a couple hours talking to ChatGPT and
eventually tracked the issue down to the file:
/etc/netplan/50-cloud-init.yaml
Which is where my wifi network and password were stored. This file
assumed the name of my wifi device would be wlp8s0 but the name had
changed to wlp9s0 due to installing the new graphics card.
Ubuntu 24.04.2 LTS
Release: 24.04
ChatGPT reply:
✅ Reproduction Steps
Prerequisites
A system running Ubuntu Server 24.04.x
A Wi-Fi adapter that uses predictable network interface names (e.g.,
wlp8s0)
Ability to add or remove PCIe devices (e.g., a GPU or network card)
1. Install Ubuntu Server 24.04 with Wi-Fi configuration
Install Ubuntu Server normally.
During setup, connect to Wi-Fi and enter Wi-Fi name (SSID) and password.
Complete the installation.
Result of this step:
Ubuntu’s cloud-init generates:
/etc/netplan/50-cloud-init.yaml
which contains something like:
network:
version: 2
wifis:
wlp8s0:
dhcp4: true
access-points:
"MySSID":
password: "mypassword"
The Wi-Fi device name (wlp8s0) is derived from its PCI bus location at
installation time.
2. Boot the system normally
Verify that networking works as expected using the original device name:
ip a | grep wl
You’ll see:
wlp8s0: ...
3. Shut the system down and install new PCIe hardware
This can be:
A graphics card
A network card
Any device that changes PCI bus numbering
The key is that the order of devices on the PCI bus changes, which
causes predictable network interface naming to assign a new name to the
Wi-Fi adapter.
4. Boot the system again
Now check the interface names:
ip a | grep wl
You will now see something like:
wlp9s0: ...
The kernel renames the Wi-Fi interface because its bus ID changed after
adding the new card.
5. Observe that cloud-init’s netplan config does not update
The file /etc/netplan/50-cloud-init.yaml still contains:
wlp8s0:
But the real interface is now wlp9s0.
This means:
Netplan tries to configure wlp8s0
That interface no longer exists
Wi-Fi never comes up
Internet stops working
Bug reproduced.
Summary of the root cause
Cloud-init only generates /etc/netplan/50-cloud-init.yaml once, on the first
boot.
It never automatically updates it when hardware changes—even when device
names change due to the predictable naming scheme.
Thus, at the next boot:
The kernel renames the interface due to PCI changes
Cloud-init does NOT update its YAML file
Netplan applies a configuration for a nonexistent interface
Wi-Fi is silently broken
This is precisely the situation described in the report.
If you'd like, I can also provide:
✅ A complete writeup for the bug tracker
✅ Expected vs. actual behavior
✅ Suggested fixes for cloud-init or tooling
✅ Workarounds (like using MAC-address-based match rules in netplan)
Just tell me what you want!
END OF CHATGPT RESPONSE
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2111774
Title:
Installing a new graphics card causes wifi device to be renamed from
wlp8s0 to wlp9s0 which breaks the internet
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2111774/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs