Bug 907215 - after installation of qemu package, permissions on /dev/kvm wrong
after installation of qemu package, permissions on /dev/kvm wrong
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
18
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Fedora Virtualization Maintainers
Fedora Extras Quality Assurance
:
: 918914 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-03 14:47 EST by Zbigniew Jędrzejewski-Szmek
Modified: 2013-04-17 22:29 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-17 22:29:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zbigniew Jędrzejewski-Szmek 2013-02-03 14:47:25 EST
Description of problem:
If kvm module is loaded before qemu-system is installed, the permissions on /dev/kvm are wrong (0660 root:root, not 0666 root:kvm), because /usr/lib/udev/rules.d/80-kvm.rules was not present when the module was loaded and the device node created. It would be nice to force a reload of udev permissions on package installation. Not terribly important, but confusing.
Comment 1 Cole Robinson 2013-02-06 16:21:16 EST
(In reply to comment #0)
> Description of problem:
> If kvm module is loaded before qemu-system is installed, the permissions on
> /dev/kvm are wrong (0660 root:root, not 0666 root:kvm), because
> /usr/lib/udev/rules.d/80-kvm.rules was not present when the module was
> loaded and the device node created. It would be nice to force a reload of
> udev permissions on package installation. Not terribly important, but
> confusing.

Thanks for the report, I can reproduce.

Can someone on the udev side give guidance here? Is there some way to trigger udev to apply these new permissions to an already existing device node? (udevadm control --reload doesn't do that for me at least). Or maybe we move that 80-kvm.rules file into udev proper so those are always the default permissions?
Comment 2 Kay Sievers 2013-02-07 05:53:59 EST
This should do it:
  udevadm trigger --subsystem-match=misc --sysname-match=kvm --action=add

The rules could only move to udev if the "kvm" group is unconditionally
created before udev runs, even on a minimal system. Udev cannot use any
rules with textual uid/guid which are not always on the base OS in the
system db. Udev cannot resolve uids/gids over ldap and such, because it
runs too early.
Comment 3 Paolo Bonzini 2013-02-07 10:09:38 EST
We already run "udevadm trigger --sysname-match=kvm" in the post script, after instaling 80-kvm.rules, so IIUC all we have to do is add "--action=add" too.

BTW yes, the "kvm" group should be unconditionally in /etc/group.
Comment 4 Amit Saha 2013-02-19 01:18:54 EST
Ran into this one. Had to change the group of /dev/kvm to 'kvm' and do:

# setfacl -m g:kvm:rw /dev/kvm 

for virt-install to work.
Comment 5 Cole Robinson 2013-03-05 16:15:03 EST
Setting to POST since this just requires a spec file tweak
Comment 6 Qixiang Wan 2013-03-07 21:42:16 EST
*** Bug 918914 has been marked as a duplicate of this bug. ***
Comment 7 Fedora Update System 2013-04-02 13:54:06 EDT
qemu-1.2.2-8.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/qemu-1.2.2-8.fc18
Comment 8 Fedora Update System 2013-04-03 00:41:20 EDT
Package qemu-1.2.2-8.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qemu-1.2.2-8.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-4711/qemu-1.2.2-8.fc18
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2013-04-03 05:59:40 EDT
qemu-1.2.2-9.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/qemu-1.2.2-9.fc18
Comment 10 Fedora Update System 2013-04-09 02:25:33 EDT
qemu-1.2.2-10.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/qemu-1.2.2-10.fc18
Comment 11 Fedora Update System 2013-04-17 22:29:46 EDT
qemu-1.2.2-10.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.