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 1351588 - sos.html and sos.txt damages collected filenames having nonASCII character in their name
Summary: sos.html and sos.txt damages collected filenames having nonASCII character in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-30 11:48 UTC by Pavel Moravec
Modified: 2020-03-31 20:05 UTC (History)
5 users (show)

Fixed In Version: sos-3.8-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 20:04:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos issues 1713 0 None closed [sosreport] format of reports (plain/html/json?) 2020-07-02 02:45:34 UTC
Red Hat Product Errata RHEA-2020:1127 0 None None None 2020-03-31 20:04:59 UTC

Description Pavel Moravec 2016-06-30 11:48:28 UTC
Description of problem:
If sosreport collects a file or runs a command having a non-ASCII character in the name/command, sos_reports/sos.[html|txt] contains malformed strings for them.

Example: collecting /etc/network_řílišžluťoučkýkůňpělódy causes:

(sos.txt:)
-  files copied:
  * /etc/network_pÅ<99>ílišžluÅ¥ouÄ<8d>kýkůÅ<88>pÄ<9b>lódy

(sos.html:)
<p>Files copied:<br><ul>
<li><a href="../etc/network_pÅ<99>ílišžluÅ¥ouÄ<8d>kýkůÅ<88>pÄ<9b>lódy">/etc/network_pÅ<99>ílišžluÅ¥ouÄ<8d>kýkůÅ<88>pÄ<9b>lódy</a></li>

(The example above is worth for testers. More real example is creating quemu VM named e.g. "kůň" and let sos to collect /var/log/libvirt/qemu/kůň)


Version-Release number of selected component (if applicable):
sos-3.3-1.el7


How reproducible:
100%


Steps to Reproduce:
touch /etc/network_přílišžluťoučkýkůňpělódy
sosreport -o networking --batch
grep network_p $(tar xvJf $(ls /var/tmp/sosreport*xz -tr | tail -n1) | grep sos_reports/sos)


Actual results:
sosreport-pmoravec-rhel7.gsslab.brq.redhat.com-20160630134339/sos_reports/sos.html:<li><a href="../etc/network_pÅílišžluÅ¥ouÄkýkůÅpÄlódy">/etc/network_pÅílišžluÅ¥ouÄkýkůÅpÄlódy</a></li>
sosreport-pmoravec-rhel7.gsslab.brq.redhat.com-20160630134339/sos_reports/sos.txt:  * /etc/network_pÅílišžluÅ¥ouÄkýkůÅpÄlódy


Expected results:
sosreport-pmoravec-rhel7.gsslab.brq.redhat.com-20160630134339/sos_reports/sos.html:<li><a href="../etc/network_přílišžluťoučkýkůňpělódy">/etc/network_přílišžluťoučkýkůňpělódy</a></li>
sosreport-pmoravec-rhel7.gsslab.brq.redhat.com-20160630134339/sos_reports/sos.txt:  * /etc/network_přílišžluťoučkýkůňpělódy


Additional info:
problem occurs only on python2. python3 properly encodes the UTF string to the reports.

Comment 1 Pavel Moravec 2016-11-11 07:57:13 UTC
RHEL7.3 has been released. Re-scheduling for potential inclusion in 7.4.

Comment 2 Pavel Moravec 2017-08-31 20:55:40 UTC
re-scheduling to 7.6, no resources for 7.5.

Comment 3 Pavel Moravec 2018-04-02 13:48:05 UTC
re-scheduling to 7.7

Comment 4 Pavel Moravec 2019-08-08 07:05:00 UTC
Fix proposed in conjunction of bz1704957 / in sos #1713 .

Comment 8 errata-xmlrpc 2020-03-31 20:04: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/RHEA-2020:1127


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