RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1260885 - Misleading error message if run directory doesn't exit
Summary: Misleading error message if run directory doesn't exit
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-08 07:18 UTC by Pavel Zhukov
Modified: 2019-09-12 08:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-10 07:57:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Zhukov 2015-09-08 07:18:11 UTC
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 14:11:35 UTC
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 07:57:22 UTC
Closed as per #2


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