Bug 1016158 - libvirtd dies on bindtextdomain with insufficient error
libvirtd dies on bindtextdomain with insufficient error
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
All All
unspecified Severity low
: ---
: ---
Assigned To: Libvirt Maintainers
:
: 1026514 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-07 11:47 EDT by Andreas Fuchs
Modified: 2016-04-14 13:29 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-14 13:29:12 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 Andreas Fuchs 2013-10-07 11:47:31 EDT
If bindtextdomain failes due to non-existing localization information, libvirtd dies upon startup with a very generic error: 

LC_MESSAGES=non_LANG libvirtd
libvirtd: initialization failed

Instead, libvirtd should fall back to locale "C" or at least give some more meaningful error information.

Small patch introducing both behaviours sent to the mailinglist in parallel.
Comment 1 Eric Blake 2013-10-07 12:26:14 EDT
Mailing list thread, for reference:
https://www.redhat.com/archives/libvir-list/2013-October/msg00296.html
Comment 2 Eric Blake 2013-11-04 16:05:21 EST
*** Bug 1026514 has been marked as a duplicate of this bug. ***
Comment 3 Cole Robinson 2016-04-12 10:01:21 EDT
I sent a more complete patch:

http://www.redhat.com/archives/libvir-list/2016-April/msg00575.html
Comment 4 Cole Robinson 2016-04-14 13:29:12 EDT
commit e7db22781071a39668276a395fb547c0dd90875d
Author: Cole Robinson <crobinso@redhat.com>
Date:   Tue Apr 12 18:29:52 2016 -0400

    util: Add virGettextInitialize, convert the code
    
    Take setlocale/gettext error handling pattern from tools/virsh-*
    and use it for all standalone binaries via a new shared
    virGettextInitialize routine. The virsh* pattern differed slightly
    from other callers. All users now consistently:
    
    * Ignore setlocale errors. virsh has done this forever, presumably for
      good reason. This has been partially responsible for some bug reports:
    
      https://bugzilla.redhat.com/show_bug.cgi?id=1312688
      https://bugzilla.redhat.com/show_bug.cgi?id=1026514
      https://bugzilla.redhat.com/show_bug.cgi?id=1016158
    
    * Report the failed function name
    * Report strerror

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