Bug 1117951

Summary: [HC] - Use C-locale for numerics (strtod and friends)
Product: [Community] GlusterFS Reporter: Anders Blomdell <anders.blomdell>
Component: coreAssignee: Anders Blomdell <anders.blomdell>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: pre-releaseCC: anders.blomdell, bugs, gluster-bugs, nicolas, sbonazzo, ylavi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-14 17:26:15 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: 1122902, 1157107, 1173669    
Attachments:
Description Flags
Patch to explicitly set LC_NUMERIC to C-locale none

Description Anders Blomdell 2014-07-09 17:07:55 UTC
Created attachment 916897 [details]
Patch to explicitly set LC_NUMERIC to C-locale

Description of problem:

Commit 040319d8bced2f25bf25d8f6b937901c3a40e34b added a 

  setlocale(LC_ALL, "");

libglusterfs/src/logging.c. For some locales [i,.e. sv_SE.utf8] this will mean that the decimal separator is not '.', but somethhing else (',' in the
sv_SE.utf8 case), causing _gf_string2double will fail due to strtod ('1.0', &tail) will give the tail '.0'.


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


How reproducible:

Always with the wrong locale.


Steps to Reproduce:
1. env -i LC_NUMERIC=sv_SE.utf8 /usr/sbin/glusterfs ...

Comment 1 Anand Avati 2014-07-11 17:21:54 UTC
REVIEW: http://review.gluster.org/8299 (Use C-locale for numeric/string routines (strtod, ...) or config file parsing might fail.) posted (#2) for review on master by Anders Blomdell (anders.blomdell.se)

Comment 2 Anand Avati 2014-07-15 10:37:57 UTC
REVIEW: http://review.gluster.org/8299 (Use C-locale for numeric/string conversion routines) posted (#6) for review on master by Anders Blomdell (anders.blomdell.se)

Comment 3 Anand Avati 2014-07-15 13:40:07 UTC
REVIEW: http://review.gluster.org/8299 (Use C-locale for numeric/string conversion routines) posted (#7) for review on master by Anders Blomdell (anders.blomdell.se)

Comment 4 Anand Avati 2014-07-19 21:16:09 UTC
COMMIT: http://review.gluster.org/8299 committed in master by Vijay Bellur (vbellur) 
------
commit 5b8de971a4b81bc2bd6de0ffc6386587226295c6
Author: Anders Blomdell <anders.blomdell.se>
Date:   Fri Jul 11 19:10:21 2014 +0200

    Use C-locale for numeric/string conversion routines
    
    (strtod, ...) or config file parsing might fail.
    
    
    Change-Id: I649f29bbf87222399a0c2d1ed5a3bf136c613b9b
    BUG: 1117951
    Signed-off-by: Anders Blomdell <anders.blomdell.se>
    Reviewed-on: http://review.gluster.org/8299
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Prashanth Pai <ppai>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 5 Sandro Bonazzola 2014-12-19 12:29:25 UTC
Still an issue in 3.6.1, please set target release.

Comment 6 Sandro Bonazzola 2014-12-19 12:30:06 UTC
*** Bug 1175641 has been marked as a duplicate of this bug. ***

Comment 7 Anders Blomdell 2015-01-12 12:24:16 UTC
(In reply to Sandro Bonazzola from comment #5)
> Still an issue in 3.6.1, please set target release.

> Flags: needinfo?(anders.blomdell.se)
What info is need from me?

Comment 8 Anders Blomdell 2015-01-19 14:45:55 UTC
(In reply to Anders Blomdell from comment #7)
> (In reply to Sandro Bonazzola from comment #5)
> > Still an issue in 3.6.1, please set target release.
> 
> > Flags: needinfo?(anders.blomdell.se)
> What info is need from me?
Since I got no resonse, I'll clear the needinfo flag.

Comment 9 Niels de Vos 2015-05-14 17:26:15 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 10 Niels de Vos 2015-05-14 17:35:28 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 11 Niels de Vos 2015-05-14 17:37:50 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 12 Niels de Vos 2015-05-14 17:42:31 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user