Bug 1343437

Summary: Sosreport failed with UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 26: ordinal not in range(128)
Product: Red Hat Enterprise Linux 7 Reporter: Nikolai Sednev <nsednev>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: agk, bmr, gavin, plambri, sbradley
Target Milestone: rc   
Target Release: ---   
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: 2016-06-07 11:11:01 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 Nikolai Sednev 2016-06-07 10:56:21 UTC
Description of problem:
Sosreport failed with UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 26: ordinal not in range(128)

[root@alma03 ~]# sosreport

sosreport (version 3.2)

This command will collect diagnostic and configuration information from
this Red Hat Enterprise Linux system and installed applications.

An archive containing the collected information will be generated in
/var/tmp/sos.jTszPi and may be provided to a Red Hat support
representative.

Any information provided to Red Hat will be treated in accordance with
the published support policies at:

  https://access.redhat.com/support/

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.

Press ENTER to continue, or CTRL-C to quit.

Please enter your first initial and last name [alma03.qa.lab.tlv.redhat.com]: 
Please enter the case id that you are generating this report for []: 

 Setting up archive ...
 Setting up plugins ...
[plugin:virsh] command 'virsh list --all' timed out after 300s
 Running plugins. Please wait ...

  Running 92/92: yum...              ..        
Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 25, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1593, in main
    sos.execute()
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1568, in execute
    self.plain_report()
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1316, in plain_report
    fd.write(str(PlainTextReport(report)))
  File "/usr/lib/python2.7/site-packages/sos/reporting.py", line 150, in __str__
    return "\n".join(buf)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 26: ordinal not in range(128)

Version-Release number of selected component (if applicable):
Linux version 3.10.0-327.22.1.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) ) #1 SMP Mon May 16 13:31:48 EDT 2016
Linux alma03.qa.lab.tlv.redhat.com 3.10.0-327.22.1.el7.x86_64 #1 SMP Mon May 16 13:31:48 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.2 (Maipo)


How reproducible:
100%

Steps to Reproduce:
1.Deploy 4.0 HE on top of RHEL7.2.
2.Create VM named "Виртуалка".
3.Start VM and try getting the sosreport from host.

Actual results:
Sosreport fails with UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 26: ordinal not in range(128)

Expected results:
Sosreport should succeed.

Additional info:

Comment 1 Pavel Moravec 2016-06-07 11:11:01 UTC
Another instance of bz1296813 - collecting a file (or cmd output) with name having non-ASCII characters raise that uncaught exception.

Workaround: run sosreport with --no-report.

*** This bug has been marked as a duplicate of bug 1296813 ***