Bug 1607515
Summary: | Traceback UnicodeDecodeError in beaker-wizard when guessing Author | ||
---|---|---|---|
Product: | [Retired] Beaker | Reporter: | Jiri Peska <jpeska> |
Component: | wizard | Assignee: | Dan Callaghan <dcallagh> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Matt Tyson 🤬 <mtyson> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 25 | CC: | dcallagh, jmckenzi, mtyson, ohudlick, rjoost, todoleza |
Target Milestone: | 25.6 | Keywords: | Patch |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-09-03 23:31:40 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
Jiri Peska
2018-07-23 15:52:36 UTC
Thanks for the detailed report Jiři. I wonder if we should interpret GECOS as UTF-8 unconditionally, or according to the current locale... I am assuming, like all these UNIX APIs, it is historically defined as just bytes with encoding at the discretion of the sysadmin. I see that Python 3 decodes the bytes from getpwuid() using PyUnicode_DecodeFSDefault(), which means it uses the "filesystem encoding" which has itself been fraught with problems... https://docs.python.org/2/library/sys.html#sys.getfilesystemencoding Not sure if that is better or worse than just hardcoding UTF-8. In all sane cases it will just be UTF-8 anyway. I guess the best option while we are still on Python 2 is to explicitly decode using sys.getfilesystemencoding(), to match what the behaviour will be when we switch it to Python 3 eventually. This bug fix is included in beaker-25.6-0.git.5.2f61d7f9f which is available for download here: https://beaker-project.org/nightlies/release-25/ Changed username using chfn, ran beaker wizard. Confirmed that the old beaker-client crashes on the unicode username. Installed the new beaker-client RPM and ran beaker-wizard again. Beaker wizard succeeded with the new unicode username. This has been released with Beaker 25.6. Release Notes: https://beaker-project.org/docs/whats-new/release-25.html#beaker-25-6 |