archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
5.84k stars 508 forks source link

Synchronize with udev before lsblk when appropriate #2411

Closed codefiles closed 4 months ago

codefiles commented 4 months ago

The following is from the DESCRIPTION section of lsblk(8).

Note that lsblk might be executed in time when udev does not have all information about recently added or modified devices yet. In this case it is recommended to use udevadm settle before lsblk to synchronize with udev.

Accordingly, udevadm settle should be used before lslbk in the scenario below.

https://github.com/archlinux/archinstall/blob/613bec6562c4d67c4c93d443e6d7e93fdb41ba66/archinstall/lib/disk/device_handler.py#L310-L319

Utilizing synchronization with udev should supplant these retires and sleeps.

https://github.com/archlinux/archinstall/blob/613bec6562c4d67c4c93d443e6d7e93fdb41ba66/archinstall/lib/disk/device_handler.py#L390-L392

https://github.com/archlinux/archinstall/blob/613bec6562c4d67c4c93d443e6d7e93fdb41ba66/archinstall/lib/disk/device_model.py#L1113-L1128