Bug 762452 (GLUSTER-720) - Default . decimal delimiter will not work for other locale
Summary: Default . decimal delimiter will not work for other locale
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-720
Product: GlusterFS
Classification: Community
Component: core
Version: 3.0.0
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Harshavardhana
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-14 16:11 UTC by Chida
Modified: 2015-03-23 01:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

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.)


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