Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1312688

Summary: "libvirtd: initialization failed" if there is no english langpack
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agedosier, berrange, clalancette, crobinso, itamar, jforbes, laine, libvirt-maint, rjones, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-16 23:40:10 UTC Type: Bug
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: 910269    

Description Richard W.M. Jones 2016-02-28 23:06:34 UTC
Description of problem:

In Rawhide, glibc doesn't install the English locale by default.
This stops libvirtd from starting up:

$ sudo libvirtd --help
libvirtd: initialization failed

but after installing glibc-langpack-en, it works:

$ sudo libvirtd --help

Usage:
  libvirtd [options]
[etc]

Version-Release number of selected component (if applicable):

libvirt-daemon-1.3.1-2.fc24.aarch64
(although this is arm 64 bit, I think this would affect any arch)

How reproducible:

100% probably?

Steps to Reproduce:

Upgrade libvirt from F23 -> F24.

Comment 1 Daniel Berrangé 2016-02-29 13:53:07 UTC
That error message comes from daemon/libvirtd.c in this code:

    if (setlocale(LC_ALL, "") == NULL ||
        bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
        textdomain(PACKAGE) == NULL ||
        virInitialize() < 0) {
        fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
        exit(EXIT_FAILURE);
    }

Presumably one of those 3 locale related functions is now failing, but I wonder why the would fail ?

Comment 2 Richard W.M. Jones 2016-02-29 15:24:22 UTC
Started a thread upstream to discuss what to do:

https://www.redhat.com/archives/libvir-list/2016-February/msg01470.html

Comment 3 Richard W.M. Jones 2016-02-29 15:25:23 UTC
setlocale fails, the others are successful.

Comment 4 Cole Robinson 2016-03-16 23:38:12 UTC
Rich, wasn't this get fixed on the fedora glibc side? any idea if we still need libvirt patching?

Comment 5 Cole Robinson 2016-03-16 23:40:10 UTC
I see Jan's comment on libvirt-list about this Fedora upgrade bug: https://bugzilla.redhat.com/show_bug.cgi?id=1312103

Maybe there was a packaging issue too which prevented any locale from being available. I'll close this bug, but anyone reopen if we still need to patch libvirt

Comment 6 Richard W.M. Jones 2016-03-17 10:16:35 UTC
Yes this is fixed in glibc.  Probably best to continue this
on the mailing list (see comment 2).