RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1552146 - vdo fails to compute default value with non en_US locales
Summary: vdo fails to compute default value with non en_US locales
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: vdo
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Joseph Chapman
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-06 15:17 UTC by Roberto Bergantinos
Modified: 2019-03-06 01:09 UTC (History)
5 users (show)

Fixed In Version: 6.1.1.77
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:39:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3094 0 None None None 2018-10-30 09:39:50 UTC

Description Roberto Bergantinos 2018-03-06 15:17:51 UTC
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

Comment 2 Bryan Gurney 2018-03-06 15:49:42 UTC
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

Comment 3 Joseph Chapman 2018-04-25 15:26:14 UTC
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.

Comment 5 Jakub Krysl 2018-07-11 10:10:07 UTC
# 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

Comment 7 errata-xmlrpc 2018-10-30 09:39:22 UTC
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


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