]> git.ipfire.org Git - thirdparty/libvirt.git/commit
node_device: Use "udev" monitor source
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Nov 2020 11:56:39 +0000 (12:56 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Nov 2020 13:28:47 +0000 (14:28 +0100)
commit7e67a136dab9034dd3cb2ed76fa90c524c800cde
treed9e940c4300798e8ab3445142d3b358a07a91e15
parent7e09a6f1fd6250738895dfe8645dfc29bb63f7da
node_device: Use "udev" monitor source

In v6.3.0-rc1~67 I've made a switch: instead of listening on udev
events the nodedev driver started listening for kernel events.
This was because when a device changes its name (e.g. NICs) we
will get "move" event with DEVPATH_OLD property set, which we can
then use to remove the old device and thus keep our internal list
up to date. The switch to "kernel" source was made because if the
old NICs naming (eth0, eth1, ...) is enabled (e.g. via
net.ifnames=0 on the kernel cmd line) then udev overwrites the
property with the new name making our internal list go out of
sync. Interestingly, when the od NICs naming is not enabled then
the DEVPATH_OLD contains the correct value.

But as it turns out, "kernel" source might be missing some other
important properties, e.g. USB vendor/product IDs. Therefore,
switch back to "udev" source and wish the best of luck to users
using the old NICs naming.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1897625
Fixes: 9a13704818e4a018723e0ec5b9e97b176f1c8584
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/node_device/node_device_udev.c