Bug 1552146
| Summary: | vdo fails to compute default value with non en_US locales | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Roberto Bergantinos <rbergant> |
| Component: | vdo | Assignee: | Joseph Chapman <jochapma> |
| Status: | CLOSED ERRATA | QA Contact: | Jakub Krysl <jkrysl> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.5 | CC: | awalsh, bgurney, jkrysl, jochapma, limershe |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 6.1.1.77 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-30 09:39:22 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This seems to succeed for some locales, and fail for others, in a way that's not fully consistent with how each locale uses decimal (i.e.: floating point) separators.
Example: German (de_DE) (known for using , for decimal separator)
[root@rhel75test ~]# env | grep LC_NUMERIC
LC_NUMERIC=de_DE.utf8
[root@rhel75test ~]# vdo create --name=vdo1 --device=/dev/sdb --verbose
Creating VDO vdo1
grep MemAvailable /proc/meminfo
vdo: ERROR - Not enough available memory in system for index requirement of 25G
Example: French (fr_FR) (known for using , for decimal separator)
[root@rhel75test ~]# export LC_NUMERIC=fr_FR.utf8
[root@rhel75test ~]# env | grep LC_NUMERIC
LC_NUMERIC=fr_FR.utf8
[root@rhel75test ~]# vdo create --name=vdo1 --device=/dev/sdb --verbose
Creating VDO vdo1
grep MemAvailable /proc/meminfo
pvcreate -qq --test /dev/sdb
modprobe kvdo
vdoformat --uds-checkpoint-frequency=0 --uds-memory-size=0.25 /dev/sdb
vdodumpconfig /dev/sdb
Starting VDO vdo1
dmsetup status vdo1
grep MemAvailable /proc/meminfo
modprobe kvdo
vdodumpconfig /dev/sdb
dmsetup create vdo1 --uuid VDO-8287dc2a-8ee2-44b7-a6be-cfb0105f25de --table '0 75351184 vdo /dev/sdb 4096 disabled 0 32768 16380 on auto vdo1 ack=1,bio=4,bioRotationInterval=64,cpu=2,hash=1,logical=1,physical=1'
dmsetup status vdo1
Starting compression on VDO vdo1
dmsetup message vdo1 0 compression on
dmsetup status vdo1
VDO instance 3 volume is ready at /dev/mapper/vdo1
Merged as change 133919. The --indexMem option now accepts any of the fixed strings 0,25, 0,5, and 0,75 in addition to 0.25, 0.5, and 0.75, regardless of locale. # export LC_NUMERIC=es_ES.utf8 # vdo create --name vdo --device /dev/sdb Creating VDO vdo Starting VDO vdo Starting compression on VDO vdo VDO instance 4 volume is ready at /dev/mapper/vdo # vdo create --name vdo --device /dev/sdb --indexMem 0,25 Creating VDO vdo Starting VDO vdo Starting compression on VDO vdo VDO instance 5 volume is ready at /dev/mapper/vdo # vdo create --name vdo --device /dev/sdb --indexMem 0.25 Creating VDO vdo Starting VDO vdo Starting compression on VDO vdo VDO instance 6 volume is ready at /dev/mapper/vdo Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3094 |
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build Identifier: vdo command return an error if LC_NUMERIC is set to non en_US locale. i.e: [root@instructor ~]# env | grep LC_NUMERIC LC_NUMERIC=es_ES.utf8 [root@instructor ~]# fdisk -l /dev/vdc Disk /dev/vdc: 21.5 GB, 21474836480 bytes, 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes [root@instructor ~]# vdo create --verbose --name=myvdo1 --device=/dev/vdc --vdoLogicalSize=2T Creating VDO myvdo1 grep MemAvailable /proc/meminfo vdo: ERROR - Not enough available memory in system for index requirement of 25G [root@instructor ~]# export LC_NUMERIC=en_US.utf8 [root@instructor ~]# vdo create --verbose --name=myvdo1 --device=/dev/vdc --vdoLogicalSize=2T Creating VDO myvdo1 grep MemAvailable /proc/meminfo pvcreate -qq --test /dev/vdc modprobe kvdo vdoformat --uds-checkpoint-frequency=0 --uds-memory-size=0.25 --logical-size=2T /dev/vdc vdodumpconfig /dev/vdc Starting VDO myvdo1 dmsetup status myvdo1 modprobe kvdo vdodumpconfig /dev/vdc dmsetup create myvdo1 --uuid VDO-81700c44-a8fa-45bd-9461-9a3705b36db3 --table '0 4294967296 dedupe /dev/vdc 4096 disabled 0 32768 16380 on sync myvdo1 ack=1,bio=4,bioRotationInterval=64,cpu=2,hash=1,logical=1,physical=1' dmsetup status myvdo1 Starting compression on VDO myvdo1 dmsetup message myvdo1 0 compression on dmsetup status myvdo1 VDO instance 1 volume is ready at /dev/mapper/myvdo1 Looks vdo needs language support, maybe this should be categorized as RFE Reproducible: Always Steps to Reproduce: 1. set LC_NUMERIC to non US value 2. create a volume not specifying Index size (default value 0.25G) Actual Results: vdo: ERROR - Not enough available memory in system for index requirement of 25G Expected Results: successfully create the volume SizeString module/class relies on LC_NUMERIC in _atof method so that's probably the issue. I.e in spanish comma is used to represent floating point not dot, so that's likely how 0.25 ended being 25GB in above example