Bug 585600 - libvirtd fails to start without a correct /etc/hosts file, and installer doesn't add hostname to /etc/hosts
libvirtd fails to start without a correct /etc/hosts file, and installer does...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Chris Lalancette
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-24 19:36 EDT by Gordan Bobic
Modified: 2010-09-09 07:09 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-0.8.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-02 16:52:33 EDT
Type: ---
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 Gordan Bobic 2010-04-24 19:36:39 EDT
Description of problem:
libvirtd fails to start. The error it returns is:
error: Unable to initialize network sockets

Version-Release number of selected component (if applicable):
libvirt-0.7.6-2.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL6b with Desktop package selection
2. libvirtd service will be failing to start.
  
Actual results:
error: Unable to initialize network sockets

Expected results:
Successful start

Additional info:
Digging a little deeper, it looks like the problem is related to a faulty /etc/hosts file (not all that intuitive from the error message!). It seems the installer hasn't added a suitable entry for the local host name at install time. On F12, IIRC, the hostname is added to 127.0.0.1, which makes this work. RHEL6b installer doesn't do the same thing (regression?).

Adding a suitable line to /etc/hosts containing the local host name fixes the problem.
Comment 2 RHEL Product and Program Management 2010-04-24 21:12:12 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Chris Lalancette 2010-04-26 08:57:12 EDT
(In reply to comment #0)
> Additional info:
> Digging a little deeper, it looks like the problem is related to a faulty
> /etc/hosts file (not all that intuitive from the error message!). It seems the
> installer hasn't added a suitable entry for the local host name at install
> time. On F12, IIRC, the hostname is added to 127.0.0.1, which makes this work.
> RHEL6b installer doesn't do the same thing (regression?).

No, in point of fact, adding the hostname as 127.0.0.1 is entirely the wrong thing to do (so it's a bug in F-12's installer).  It just doesn't make any sense.  The real problem is that libvirt was depending on the hostname to be setup properly at all times.  The good news is that this should be fixed in the latest libvirt packages for RHEL-6, 0.8.0 or so, which will be available in Beta2.

Chris Lalancette
Comment 9 releng-rhel@redhat.com 2010-07-02 16:52:33 EDT
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.
Comment 10 Nan Zhang 2010-09-09 07:09:06 EDT
Verified with libvirt-0.8.1-27.el6.x86_64 & qemu-kvm-0.12.1.2-2.113.el6.x86_64.

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