RuntimeError: duplicate mac found! both 'wwan1' and 'wwan0'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Undecided
|
Chad Smith |
Bug Description
Hi
This bug is a variant of https:/
I got this error only when PXE booting a target with a modem that has dual interface support, and using ubuntu-
Detected modems that cause this error:
Quectel EG25
Quectel RM510Q-GLHA
Sierra Wireless MC7455
Failure in cloud-init prevent automatic installation of targets in our production.
Tested solution:
After studying the info in bug 1997922, I downloaded https:/
if driver == "mscc_felix" or driver == "fsl_enetc" or driver == "qmi_wwan":
Then created a customized version of ubuntu-
Logs:
cat > get_driver.py <<EOF
from cloudinit.net import device_driver
import sys
print(device_
EOF
for nic in wwan0 wwan1 eno1 eno2 eno3 eno4 eno5 eno6; do
echo "----- $nic"
ls -l /sys/class/
python3 ./get_driver.py $nic;
done
Output:
---- wwan0
lrwxrwxrwx 1 root root 0 Mar 1 08:11 /sys/class/
qmi_wwan
---- wwan1
lrwxrwxrwx 1 root root 0 Mar 1 08:11 /sys/class/
qmi_wwan
---- eno1
lrwxrwxrwx 1 root root 0 Mar 1 08:10 /sys/class/net/eno1 -> ../../devices/
igb
---- eno2
lrwxrwxrwx 1 root root 0 Mar 1 08:10 /sys/class/net/eno2 -> ../../devices/
igb
---- eno3
lrwxrwxrwx 1 root root 0 Mar 1 08:10 /sys/class/net/eno3 -> ../../devices/
igb
---- eno4
lrwxrwxrwx 1 root root 0 Mar 1 08:10 /sys/class/net/eno4 -> ../../devices/
igb
---- eno5
lrwxrwxrwx 1 root root 0 Mar 1 08:10 /sys/class/net/eno5 -> ../../devices/
ixgbe
---- eno6
lrwxrwxrwx 1 root root 0 Mar 1 08:10 /sys/class/net/eno6 -> ../../devices/
ixgbe
Please let me know if you want more info or help for testing a final solution
Changed in cloud-init: | |
status: | New → Triaged |
Changed in cloud-init: | |
status: | In Progress → Fix Committed |
Thank you for filing this bug and helping improve Ubuntu and cloud-init.
While I think your solution is probably what we need to go forward with, I wanted to double check a couple of other data points in SysFs so we can be aware if there may be other config artifacts that can alert cloud-init to this type of device in the future.
1. In your bug file above it looks like you intended to loo over each device, running 'ls -l /sys/class/ net/$nic/ ' But the output looks like it ran 'ls -l /sys/class/ net/$nic' (without the trailing forward slash '/') This only gives us the what directory the symlink points to, but we need to see the files and timestamps inside that linked directory.
Please run: net/$dev/ device/ driver; net/$dev/ device/ driver; net/$dev/ ;
for dev in wwan0 wwan1 eno1 eno2 eno3 eno4 eno5 eno6; do
echo ---- $dev;
ls -l --full-time /sys/class/
cat /sys/class/
ls -l --full-time /sys/class/
done
Much thanks. The --full-time timestamps are important when we compare against the cloud-init logs collected from journalctl so we can see specifically the ordering of when device driver detection is complete for the device versus cloud-init's network discovery operations (logged in cloud-init.log).