Bug 1477836
Summary: | No Compatibility for Unicode Characters in RHOSP 10 | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Ganesh Kadam <gkadam> |
Component: | python-openstackclient | Assignee: | Julie Pichon <jpichon> |
Status: | CLOSED DUPLICATE | QA Contact: | Shai Revivo <srevivo> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 10.0 (Newton) | CC: | apevec, gkadam, jdennis, justinas.balciunas, lhh, nkinder, panbalag, smykhail, srevivo |
Target Milestone: | async | Keywords: | Triaged, ZStream |
Target Release: | 10.0 (Newton) | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-10-23 19:26:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ganesh Kadam
2017-08-03 05:09:54 UTC
The initial bug description references bug#1327893 which I believe is the likely cause. Although I have not had a chance to verify how puppet is invoking the openstack client I believe it is very likely doing so with it's output redirected which is the topic of bug#1327893. That bug report has comment #13 which lists 2 upstream patches that need to be applied for UTF-8 to work correctly with openstack client. I am the author of both those patches. The first patch (https://review.openstack.org/#/c/342914/5) is the one which should solve the issue reported here. It should have been included in the python-cliff RPM. Upstream cliff has included that patch in the following tags: 2.2.0 2.3.0 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 As far as I can tell OSP-10 should have shipped with python-cliff-2.2.0 which should have included that fix. We need to know the version of python-cliff on the node showing the failure. We also need to know the value of the locale in the environment in which the script executes. The patch will have modified /usr/lib/python2.7/site-packages/cliff/app.py to add code to the _set_streams() method Part of that patch includes these lines: if six.PY2: encoding = locale.getpreferredencoding() if encoding: If that patch is missing or if locale.getpreferredencoding() does not return an encoding the if block won't be entered which sets the output encoder for redirected streams. An incorrect encoding (e.g. ascii) will also cause the failure. The python-cliff-2.2.0-1.el7ost.noarch package should have the fix in it so my guess is the fix is not executing because of the environment. The locale is normally defined by the LANG environment variable. Probably the easiest way to get the information we need is by temporarily adding a print statement to the Python code. in /usr/lib/python2.7/site-packages/cliff/app.py edit the code to add the print statement so it looks like this. if six.PY2: encoding = locale.getpreferredencoding() print "encoding=%s LANG=%s" % (encoding, os.environ['LANG']) if encoding: You then need to rerun things *exactly* as when the error occurs. That's because many of the configuration tools (e.g. Puppet) modify the environment. As a matter of fact I seem to recall one or more of the tools sets the locale to "C" without any encoding specification which would certainly cause problems with internationalized strings. A fix for this issue was committed upstream: https://review.openstack.org/#/c/508760/ The upstream bug is: https://bugs.launchpad.net/python-cliff/+bug/1720115 The Red Hat bugzilla where this work is being tracked is: https://bugzilla.redhat.com/show_bug.cgi?id=1437402 This bug should be closed as a duplicate of the above. *** This bug has been marked as a duplicate of bug 1437402 *** |