Bug 762452 (GLUSTER-720)

Summary: Default . decimal delimiter will not work for other locale
Product: [Community] GlusterFS Reporter: Chida <chida>
Component: coreAssignee: Harshavardhana <fharshav>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 3.0.0CC: cww, fharshav, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chida 2010-03-14 16:11:14 UTC
There's a small bug because of my (CZ) locale and I guess that it could also appear in other locales. Please forward this to responsible persons.

The following option supposes that "." is delimiter between integers and decimals. But we use "," as delimiter in CZ locale:
option cache-size `grep 'MemTotal' /proc/meminfo  | awk '{print $2 * 0.2 / 1024}' | cut -f1 -d.`MB

Better solution is:
option cache-size `echo $[ $(grep 'MemTotal' /proc/meminfo | sed 's/[^0-9]//g') / 5120 ]`MB

Comment 1 Anand Avati 2010-03-16 02:06:37 UTC
PATCH: http://patches.gluster.com/patch/2930 in master (Fixed "." delimiter for cache-size calculation which would fail on different locale.)

Comment 2 Anand Avati 2010-03-16 02:06:41 UTC
PATCH: http://patches.gluster.com/patch/2929 in release-2.0 (Fixed "." delimiter for cache-size calculation which would fail on different locale.)

Comment 3 Anand Avati 2010-03-16 02:06:45 UTC
PATCH: http://patches.gluster.com/patch/2928 in release-3.0 (Fixed "." delimiter for cache-size calculation which would fail on different locale.)