Report tool traceback on utf-8 decode

Bug #2067952 reported by Eric MacDonald
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
In Progress
Undecided
Unassigned

Bug Description

Brief Description
-----------------
The Report Tool did a utf-8 UnicodeDecodeError traceback while analyzing a bundle.

Code should have a try/except block in this path.

Severity
--------
Major if it happens.

Steps to Reproduce
------------------
report.py -d <path to bundle>

Expected Behavior
------------------
Report analysis completes without execution error.

Actual Behavior
----------------
Report analysis is incomplete.

Reproducibility
---------------
Seen on one collect bundle.

System Configuration
--------------------
suspect System Controller

Branch/Pull Time/Commit
-----------------------
Any prior to this issue being resolved. June 4th, 2024 time frame.

Last Pass
---------
Tool needs to handle string parsing case better

Timestamp/Logs
--------------
Traceback (most recent call last):
  File "/folk/cgts/tools/report/report.py", line 907, in <module>
    engine.execute(plugins, output_dir)
  File "/folk/cgts/tools/report/execution_engine.py", line 382, in execute
    plugin.state["exclude"]),
  File "/folk/cgts/tools/report/plugin_algs/daemon_failures.py", line 40, in daemon_failures
    data = substring(start, end, daemon_substrings, daemon_files, exclude_list)
  File "/folk/cgts/tools/report/plugin_algs/substring.py", line 59, in substring
    status = _continue(start, end, file)
  File "/folk/cgts/tools/report/plugin_algs/substring.py", line 140, in _continue
    line = f.readline()
  File "/usr/local/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 6363: ordinal not in range(128)

Test Activity
-------------
PV

Workaround
----------
Analyze bundle manually.
No easy workaround.
Issue will be fixed soon. Pull new content.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to utilities (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/utilities/+/921081

Changed in starlingx:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.