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 1679591 - ssm: unhandled exception for some locales set through LC_ALL
Summary: ssm: unhandled exception for some locales set through LC_ALL
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: system-storage-manager
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukáš Czerner
QA Contact: Boyang Xue
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-21 13:37 UTC by Jan Tulak
Modified: 2019-08-06 12:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 12:55:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2133 0 None None None 2019-08-06 12:55:13 UTC

Description Jan Tulak 2019-02-21 13:37:29 UTC
Description of problem:
When LC_ALL is set to a locale with different decimal character than dot "." (e.g. cs_CZ.UTF-8), ssm crashes.

# ssm list
Traceback (most recent call last):
File "/usr/bin/ssm", line 48, in 
sys.exit(main.main())
File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 2110, in main
args.func(args)
File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 1339, in list
self.dev.ptable()
File "/usr/lib/python2.7/site-packages/ssmlib/main.py", line 639, in ptable
item = misc.humanize_size(data[attr])
File "/usr/lib/python2.7/site-packages/ssmlib/misc.py", line 444, in humanize_size
size = float(arg)
ValueError: invalid literal for float(): 148631552,00
[root@a2s-server-test ~]# uname -a
Linux ##################### 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@a2s-server-test ~]# ssm --version
0.4


Version-Release number of selected component (if applicable):
This issue is present from the beginning, this is not a regression.

How reproducible:
Every time

Steps to Reproduce:
$ export LC_ALL="cs_CZ.UTF-8"
$ sudo ssm list

Actual results:
ssm crashes with an unhandle ValueError: invalid literal for float()

Expected results:
ssm does the same thing as with LC_ALL='C'


Additional info:
The simplest fix is to run all the tools from ssm with LC_ALL='C'. This will ignore the user-set preference for localization, but as SSM does not support localization at all, this is not an issue. Furthermore, ssm already overwrites LC_NUMERIC. This can be changed to LC_ALL to fix this issue.

This issue was not noticed before probably because users with different locale usually used individual LC_* variables and for that case ssm already had a solution.

Comment 1 Jan Tulak 2019-02-22 15:55:24 UTC
Patch is available in upstream, I'm adding it to the current release.

Comment 9 errata-xmlrpc 2019-08-06 12:55:09 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-2019:2133


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