I just happened upon this while reviewing another patch ... On Wed, Apr 08, 2026 at 02:16:09PM +0200, Michal Privoznik via Devel wrote:
Therefore, to avoid this problem, wait for udev to settle by calling virWaitForDevices() (which under the hood spawns "udevadm settle". This may be a bit too heavy hammer though because the function is called basically once per (almost) each <interface/>. If we find that to be a performance drawback then we need to redesign how tun/tap/... devices are created (well, opened).
I should note that 'udevadm settle' is broken and upstream refuses to fix it, because of course they claim to know better than everyone else: https://github.com/systemd/systemd/issues/40499 I don't know if this also affects network devices. I guess it depends if the kernel can emit events in the same way as for block devices. For block devices our approach has been to continue to use 'udevadm settle' since there is no sane alternative. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html