Block probing sometimes crashes because /sys/class/block/<device>/size does not exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subiquity |
Triaged
|
Medium
|
Olivier Gayot |
Bug Description
We have had at least 3 distinct private reports of block probing failing because we could not read a /sys/class/
File "/probert/
str(
File "/probert/
with open(blockdev_size) as d:
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/
2024-04-24 18:25:52,722 DEBUG subiquity.
The error does not explicitly tell whether it is the /sys/block/<device> directory that does not exist, or the /sys/block/
Although this could be due to a race condition when a given device is unplugged during probing, I think it is quite unlikely for NVMe devices.
I would like to consider:
1. writing a new function that takes the value of DEVPATH instead of DEVNAME (so we don't have to "guess" where to find the device in the sysfs).
2. in case of error, logging whether the directory existed and/or the size file.
description: | updated |
Changed in subiquity: | |
assignee: | nobody → Olivier Gayot (ogayot) |
status: | New → Triaged |
importance: | Undecided → Medium |
https:/ /github. com/canonical/ probert/ pull/144