ip: can't find device '/sys/class/net/enp1s0'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
clevis (Ubuntu) |
Fix Released
|
Undecided
|
dann frazier | ||
Bionic |
Fix Released
|
Undecided
|
dann frazier | ||
Focal |
Fix Released
|
Undecided
|
dann frazier | ||
Groovy |
Fix Released
|
Undecided
|
dann frazier |
Bug Description
[Impact]
Whether or not clevis successfully unlocks the root volume in the initramfs, errors like the following appear on the console as boot completes:
Begin: Running /scripts/
ip: can't find device '/sys/class/
ip: can't find device '/sys/class/
ip: SIOCGIFFLAGS: No such device
ip: can't find device '/sys/class/
ip: can't find device '/sys/class/
ip: SIOCGIFFLAGS: No such device
ip: can't find device '/sys/class/net/lo'
ip: can't find device '/sys/class/net/lo'
done.
Begin: Running /scripts/
[ 23.582112] systemd[1]: Inserted module 'autofs4'
The problem is due to a thinko in clevis' local-bottom script. It tries to deconfigure the interfaces brought up in the counterpart local-top script using a "for iface in /sys/class/net/*; do" loop - but it fails to strip off the dirname of that path. This causes it to execute 'ip' commands on /sys/class/
[Fix]
Fixed in upstream commit:
https:/
[Regression Potential]
The real risk here seems to be the change in behavior caused by now actually bringing down the interfaces as intended. It's possible users are relying on this behavior by e.g. continuing to use networking in initramfs scripts that run later. While I am proposing we follow upstream's fix here - we could also consider just disabling this code altogether. That would get rid of the error messages, but still leave the interfaces up.
Changed in clevis (Ubuntu Groovy): | |
status: | New → In Progress |
assignee: | nobody → dann frazier (dannf) |
Changed in clevis (Ubuntu Focal): | |
status: | New → Confirmed |
Changed in clevis (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in clevis (Ubuntu Focal): | |
status: | Confirmed → In Progress |
Changed in clevis (Ubuntu Bionic): | |
status: | Confirmed → In Progress |
Changed in clevis (Ubuntu Focal): | |
assignee: | nobody → dann frazier (dannf) |
Changed in clevis (Ubuntu Bionic): | |
assignee: | nobody → dann frazier (dannf) |
This bug was fixed in the package clevis - 13-2ubuntu1
---------------
clevis (13-2ubuntu1) groovy; urgency=medium
* initramfs: Fix parsing of interface names when bringing the network net/$iface' " errors on the console. LP: #1896294.
back down in local-bottom, which also avoids a mess of "ip: can't find
device '/sys/class/
* initramfs: Warn users with multiple interfaces that they should consider
specifying an 'ip=' parameter for reliable operation. LP: #1896289.
As a side-effect, also fix interface parsing while bringing links
up. LP: #1873593.
* initramfs: Wait for interface to appear before attempting configuration.
LP: #1873914.
-- dann frazier <email address hidden> Mon, 21 Sep 2020 11:04:00 -0600