clevis-initramfs no ethernet because of Error: argument " enp2s0" is wrong: "dev" not a valid ifname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
clevis (Ubuntu) |
Fix Released
|
Undecided
|
dann frazier | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
dann frazier | ||
Groovy |
Fix Released
|
Undecided
|
dann frazier |
Bug Description
[Impact]
The original report shows a scenario where clevis fails to bring up networking in the initramfs, resulting in a failure to automatically unlock a LUKS volume using a tang server. While it isn't clear how the problem manifests (see Comment #2), it is clear from the user's description of a workaround that the fix for bug 1896289. should also fix this issue as a side-effect. Without truly understanding the root cause I'd normally not propose this for an SRU, but here we're getting it "for free".
[Fix]
The issue is with how the function clevis_
https:/
[Test Case]
Confirm that automatic unlocking using a tang server works.
[Regression Potential]
A coding error here could break auto-unlocking of a LUKs root device, requiring the user to manually enter a passphrase on the console.
Changed in clevis (Ubuntu Groovy): | |
status: | New → In Progress |
Changed in clevis (Ubuntu Focal): | |
status: | New → Triaged |
Changed in clevis (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in clevis (Ubuntu Groovy): | |
assignee: | nobody → dann frazier (dannf) |
Changed in clevis (Ubuntu Focal): | |
status: | Triaged → In Progress |
assignee: | nobody → dann frazier (dannf) |
description: | updated |
That's really strange. I mean, clevis_ all_netbootable _devices( ) certainly does prepend a space. After cut & pasting the function into the shell:
(initramfs) clevis_ all_netbootable _devices( ) { all_netbootable _devices
> for device in /sys/class/net/*; do
<snip - rest of the function>
> }
(initramfs) clevis_
enp1s0 enp7s0
(initramfs)
But the way it is called by eth_check should be fine as long as it is using the default $IFS (and I see no evidence this has changed):
---- all_netbootable _devices) ; do
for device in $(clevis_
ip link set dev "$device" up
---
(initramfs) for device in $(clevis_ all_netbootable _devices) ; do
> echo ",$device,"
> done
,enp1s0, <<< no preceding space
,enp7s0,
,enp1s0,
,enp7s0,
(initramfs)