Bug 762452 (GLUSTER-720)
| Summary: | Default . decimal delimiter will not work for other locale | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Chida <chida> |
| Component: | core | Assignee: | Harshavardhana <fharshav> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 3.0.0 | CC: | 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: | |||
PATCH: http://patches.gluster.com/patch/2930 in master (Fixed "." delimiter for cache-size calculation which would fail on different locale.) PATCH: http://patches.gluster.com/patch/2929 in release-2.0 (Fixed "." delimiter for cache-size calculation which would fail on different locale.) PATCH: http://patches.gluster.com/patch/2928 in release-3.0 (Fixed "." delimiter for cache-size calculation which would fail on different locale.) |
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