Bug 768559

Summary: libvirt won't install on rawhide
Product: [Fedora] Fedora Reporter: Brian Lane <bcl>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: berrange, clalancette, crobinso, dougsland, eblake, itamar, jforbes, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-19 09:26:48 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Brian Lane 2011-12-16 20:36:15 EST
yum install libvirt results in:

Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Error in PREIN scriptlet in rpm package libvirt-0.9.7-3.fc17.x86_64
error: %pre(libvirt-0.9.7-3.fc17.x86_64) scriptlet failed, exit status 6
  Verifying  : libvirt-0.9.7-3.fc17.x86_64                                                                 1/1 

  Failed:
    libvirt.x86_64 0:0.9.7-3.fc17
Comment 1 Eric Blake 2011-12-16 23:46:33 EST
The %pre script is:

# Normally 'setup' adds this in /etc/passwd, but this is
# here for case of upgrades from earlier Fedora/RHEL. This
# UID/GID pair is reserved for qemu:qemu
getent group kvm >/dev/null || groupadd -g 36 -r kvm
getent group qemu >/dev/null || groupadd -g 107 -r qemu
getent passwd qemu >/dev/null || \
  useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
    -c "qemu user" qemu

So, first things first - what do these output on your system (when run as root)?

getent group kvm
getent group qemu
getent passwd qemu

My assumption is that somehow these groups/users did not already exist, and that the scriptlet moved on to the attempt to create them.  groupadd does not document exit status 6, but useradd documents exit status 6 as 'specified group does not exist'.  But that seems odd, given that the specified group 'kvm' was just validated or created two commands earlier.  Could this be a SELinux issue, where running (as root) 'setenforce 0' prior to 'yum install libvirt' changes behavior?  I also know that rawhide has recently changed SELinux label policies, where an incrementally installed system could have stale labels that interfere with the new expected behavior; can you run 'restorecon -rv /etc' to fix up labels before trying the installation again?
Comment 2 Brian Lane 2011-12-17 19:39:59 EST
All three of those ran with no stdout/err output. Their error codes were 2.

I set permissive and re-installed, which succeeded with one error:

error reading information on service cgconfig: No such file or directory

But it does appear to have installed.
Comment 3 Eric Blake 2011-12-19 09:26:48 EST
(In reply to comment #2)
> All three of those ran with no stdout/err output. Their error codes were 2.

Probably evidence of a SELinux mislabeling preventing them from succeeding.

> 
> I set permissive and re-installed, which succeeded with one error:

Good - the problem is not libvirt, but SELinux labeling issues on your machine.  As such, I will close this bug, as there's nothing that libvirt can do about that.  If you need to reopen this issue, then reassign it to selinux.

> 
> error reading information on service cgconfig: No such file or directory

That should be fixed independently when libvirt 0.9.8 is released for rawhide.