FileNotFound while reading /sys/class/block/<dev>/* dir
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Triaged
|
Low
|
Unassigned |
Bug Description
During clear-holders wiping devices, a rescan of the partition table can cause sysfs partition files to be removed asynchronously from reading the directory structure.
We need to accept FileNotFound errors (log them) but not allow them to be fatal as the partition was being removed.
Disk tree looks like:
Current device storage tree:
vda
|-- vda2
`-- vda1
Shutdown Plan:
{'device': '/sys/class/
{'device': '/sys/class/
{'device': '/sys/class/
After removing vda2, then vda1, and finally a wipe of vda we see this stack trace:
Traceback (most recent call last):
File "/curtin/
ret = args.func(args)
File "/curtin/
meta_
File "/curtin/
clear_
File "/curtin/
for holders_tree in [gen_holders_
File "/curtin/
for holders_tree in [gen_holders_
File "/curtin/
'holders': [gen_holders_
File "/curtin/
'holders': [gen_holders_
File "/curtin/
holder_paths = ([block.
File "/curtin/
holders = os.listdir(
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/
[Errno 2] No such file or directory: '/sys/class/
builtin command failed
finish: cmd-install/
builtin took 1.982 seconds
stage_partitioning took 1.983 seconds
Changed in curtin: | |
importance: | Undecided → Low |
status: | New → Triaged |
I see this is considered low and is over a year old. Any idea if/when this will be fixed?