Bug 742646
Summary: | libvirtd fails to start - Failed to find group record for name 'qemu' | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Pierre Larsson <rackeby> | ||||
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 6.1 | CC: | acathrow, dallan, eblake, jwest, llim, msvoboda, mzhan, rwu, syeghiay, weizhan, whuang | ||||
Target Milestone: | rc | Keywords: | ZStream | ||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | libvirt-0.9.2-1.el6 | Doc Type: | Bug Fix | ||||
Doc Text: |
Due to a programming error in the initialization code of the libvirtd daemon, the QEMU driver could have failed to find the user or group ID of the qemu application on the system. As a result, libvirtd failed to start. With this update, the error has been corrected and libvirtd now works as expected.
|
Story Points: | --- | ||||
Clone Of: | |||||||
: | 771720 (view as bug list) | Environment: | |||||
Last Closed: | 2011-12-06 11:34:55 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 743557, 771720 | ||||||
Attachments: |
|
Description
Pierre Larsson
2011-09-30 21:40:29 UTC
Created attachment 525842 [details]
Full debug log
Do you have a user and group qemu on your system? Also, if you have a support contract with Red Hat, you should open a ticket. Yes the user/group exists. I tried rolling back to the previous version of libvirt and still get the same error. I have an identical host which is working fine and was upgraded in the same fashion. The user id's and group id's are also identical on both hosts. cat /etc/passwd |grep qemu qemu:x:107:107:qemu user:/:/sbin/nologin cat /etc/group |grep qemu kvm:x:36:qemu qemu:x:107: We need to backport this commit: commit b3918fabda42e3aecf1b0bfe1079a05e6cad62f7 Author: Eric Blake <eblake> Date: Mon May 16 15:37:15 2011 -0600 build: tolerate unlimited group size POSIX allows sysconf(_SC_GETPW_R_SIZE_MAX) to return -1 if there is no fixed limit, and requires ERANGE errors to track real size. Model our behavior after the example in POSIX itself: http://pubs.opengroup.org/onlinepubs/9699919799/functions/getpwuid_r.html Also, on error for get*_r functions, errno is undefined, and the real error was the return value. * src/util/util.c (virGetUserEnt, virGetUserID, virGetGroupID) (virSetUIDGID): Cope with sysconf failure or too small buffer. Reported by Matthias Bolte. https://www.redhat.com/archives/libvir-list/2011-May/msg01074.html Problem we are facing here is: we use getgrnam_r() to get group ID for qemu. But this function can return ERANGE in case an insufficient buffer was supplied. However, there are not many ways to tell how big buffer should be sufficient, besides iterating over and over until something else than ERANGE is returned. So is there any workaround or do I have to wait for the backported package or newer package? Short of backporting the patch, or abusing LD_PRELOAD to replace the failing getgrnam_r in a way that works around unpatched libvirt's misuse of the function, I don't see any easy way to work around the failure. I'm not in charge of release decisions, but I can at least ask around to see whether it is possible to get this backport out sooner rather than later. Verify this bug with : libvirt-0.9.4-16.el6.x86_64 1) restart libvirtd service 2) check messages log: *No* find message like "Sep 30 22:35:58 kvm libvirtd: 22:35:58.907: 5356: info : libvirt version: 0.8.7, package: 18.el6_1.1 (Unknown, 2011-09-01-11:22:40, sl6.fnal.gov) Sep 30 22:35:58 kvm libvirtd: 22:35:58.907: 5356: error : virGetGroupID:2858 : Failed to find group record for name 'qemu': Numerical result out of range Sep 30 22:35:58 kvm libvirtd: 22:35:58.907: 5356: error : virStateInitialize:1038 : Initialization of QEMU state driver failed Sep 30 22:35:58 kvm libvirtd: 22:35:58.948: 5356: error : main:3326 : Driver state initialization failed Sep 30 22:35:58 kvm libvirtd: 22:35:58.949: 5357: warning : qemudDispatchSignalEvent:403 : Shutting down on signal 3 " Has the package libvirt-0.9.4-16.el6.x86_64 been released yet? The fix is publicly available as part of the RHEL 6.2 beta (https://www.redhat.com/about/news/blog/red-hat-announces-the-beta-release-of-red-hat-enterprise-linux-6-2), or you can wait for the fix to be backported to RHEL 6.1.z (tracked by bug 743557), or wait for the GA release of RHEL 6.2. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Due to a programming error in the initialization code of the libvirtd daemon, the QEMU driver could have failed to find the user or group ID of the qemu application on the system. As a result, libvirtd failed to start. With this update, the error has been corrected and libvirtd now works as expected. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1513.html |