blivet icon indicating copy to clipboard operation
blivet copied to clipboard

Add a forced delay to udev settle in chroot environments

Open win32asm opened this issue 2 years ago • 1 comments

When running in a chroot environment (e.g.mock) there is a race between udev actually settling the discovered loopback/dm device names and a program running 'udevadm settle', as latter becomes a no-op in chroot:

sh-5.1# udevadm settle Running in chroot, ignoring request.

This patch grabs stdout of 'udevadm settle' command, tries to determine whether the command was ignored, and adds an 1s delay if it was.

1s delay was chosen arbitrary, to succeed in used environment. However, it should be sufficient for most chrooted environments, as significant device changes are not expected there.

win32asm avatar Jun 24 '22 01:06 win32asm

Can one of the admins verify this patch?

StorageGhoul avatar Jun 24 '22 01:06 StorageGhoul

@vojtechtrefny please proceed with the merge.

win32asm avatar Dec 16 '22 23:12 win32asm

Jenkins, ok to test.

vojtechtrefny avatar Dec 17 '22 14:12 vojtechtrefny