FS#45821 - [qemu] post_install udevadm trigger, or message explaining /dev/kvm is root only until trigr/reboot?

Attached to Project: Arch Linux
Opened by James Harvey (jamespharvey20) - Wednesday, 29 July 2015, 00:28 GMT
Last edited by Sébastien Luttringer (seblu) - Tuesday, 04 August 2015, 18:23 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Sébastien Luttringer (seblu)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Before /usr/lib/udev/rules.d/65-kvm.rules is used, installed by qemu, /dev/kvm has crw------- root:root rights. After 65-kvm.rules is used, it has crw-rw----

Should the qemu package do a post_install of a "udevadm trigger"? (Not sure if there are any unintended consequences of doing so.)

Or, if this is undesireable, have post_install make a very noticeable message explaining that until reboot or doing a "udevadm trigger", one will get "Could not access KVM kernel module: Permission denied" errors, when doing things as non-root?
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Tuesday, 04 August 2015, 18:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  2.3.0-6
Comment by Sébastien Luttringer (seblu) - Wednesday, 29 July 2015, 15:56 GMT
That append only when the kvm modules are loaded before qemu package is installed. The 65-kvm.rules is downstream, so we can check if the file already exists and fix the ownserhip or display a warning.
I'm not confident with triggering udev for this.
Comment by Sébastien Luttringer (seblu) - Sunday, 02 August 2015, 17:55 GMT
Finally, I can retrigger udev only on files we modify. I put something like this in the install file:

# retrigger events on modules files when already loaded
[[ -e /dev/kvm ]] && udevadm trigger /dev/kvm
[[ -e /dev/vhost-net ]] && udevadm trigger /dev/vhost-net
Comment by Sébastien Luttringer (seblu) - Monday, 03 August 2015, 13:57 GMT
could you confirm it's fixed with version 2.3.0-6?

Loading...