Bug 1260885 - Misleading error message if run directory doesn't exit
Misleading error message if run directory doesn't exit
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.7
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Libvirt Maintainers
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-08 03:18 EDT by Pavel Zhukov
Modified: 2015-09-10 03:57 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-10 03:57:22 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 Pavel Zhukov 2015-09-08 03:18:11 EDT
Description of problem:
If /var/run/libvirt directory doesn't exist for any reason libvirt is failed to start with message:
"2015-09-07 13:28:51.647+0000: 13167: error : virNetSocketNewListenTCP:239 : Unable to resolve address '0.0.0.0' service '16514': Address family for hostname not supported" 
which is absolutely misleading and making debug time consuming

Version-Release number of selected component (if applicable):
2015-09-07 13:28:51.647+0000: 13167: info : libvirt version: 0.10.2, package: 54.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2015-04-28-09:24:16, x86-033.build.eng.bos.redhat.com)


How reproducible:
100%

Steps to Reproduce:
1. service libvirtd stop
2. rm -rf /var/run/libvirtd
3. service libvird start

Actual results:
2015-09-07 13:28:51.647+0000: 13167: info : libvirt version: 0.10.2, package: 54.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2015-04-28-09:24:16, x86-033.build.eng.bos.redhat.com)
2015-09-07 13:28:51.647+0000: 13167: error : virNetSocketNewListenTCP:239 : Unable to resolve address '0.0.0.0' service '16514': Address family for hostname not supported


Expected results:
Something like
"Unable to open "/var/run/livirt" no such file or directory"

Additional info:
Comment 2 Ján Tomko 2015-09-08 10:11:35 EDT
Libvirt automatically creates /var/run/libvirt on startup, there should be no error message if it does not exist.

The error message comes from calling getaddrinfo on "0.0.0.0" with AI_ADDRCONFIG set in the hints. It means there are no IPv4 addresses configured (apart from 127.0.0.1) and it is unrelated to the existence of /var/run/libvirt, making this NOTABUG.

On RHEL 7, libvirt no longer uses AI_ADDRCONFIG for wildcard addresses, because it interfered with systemd's parallel startup:
https://bugzilla.redhat.com/show_bug.cgi?id=1098659
On RHEL 6, libvirt should only be started after the network is configured.
Comment 4 Pavel Zhukov 2015-09-10 03:57:22 EDT
Closed as per #2

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