FS#54792 - [mkinitcpio-archiso] use resolve_device() instead of poll_device()

Attached to Project: Release Engineering
Opened by Tom Yan (tom.ty89) - Thursday, 13 July 2017, 18:07 GMT
Last edited by David Runge (dvzrv) - Friday, 18 February 2022, 18:12 GMT
Task Type General Gripe
Category ArchISO
Status Closed
Assigned To David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

In the archiso initcpio hooks, poll_device() is used instead of resolve_device(). This prevent them from being able to resolve tags (UUID/LABEL/PARTUUID/PARTLABEL, actual use case being img_dev= in loop_mnt, for example) like the base hook init does. There doesn't seem to be any reason that the archiso hooks need to compromise on this.

The only thing I could think of is, archiso hooks seem to prefer a longer/hardcoded polling timeout. While resolve_device() does not take a timeout parameter directly as poll_device() does, it make use of the variable rootdelay=, so all we need to do to achieve the same thing is setting rootdelay=30 (`local` it maybe, if you think that's safer or something) in the hooks just before we call resolve_device().

P.S. I file it as a general gripe because one can easily workaround it by using /dev/disk/by-* path instead of a tag, and because udev will probably always be there in archiso's case so the path will exist once the device shows up. However, sticking resolve_device(), which is somewhat a more "external" function should make archiso more stable anyway. For example, just in case my decent patch (see task 54769) got accepted by Dave Reisner some day in the future...:P

Additional info:
* package version(s) v32

Steps to reproduce:
https://git.archlinux.org/archiso.git/tree/archiso/initcpio/hooks/archiso#n82
https://git.archlinux.org/archiso.git/tree/archiso/initcpio/hooks/archiso_pxe_nbd#n24
This task depends upon

Closed by  David Runge (dvzrv)
Friday, 18 February 2022, 18:12 GMT
Reason for closing:  Deferred
Additional comments about closing:  Closing in favor of https://gitlab.archlinux.org/mkinitcpio/ mkinitcpio-archiso/-/issues/10
Comment by David Runge (dvzrv) - Tuesday, 25 August 2020, 16:15 GMT
@tom.ty89: Thanks for the report.

Please note, that I'm about to split out mkinitcpio-archiso from archiso [1] and after that will add a ticket referencing this one in the respective gitlab repository.

[1] https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/103

Loading...