Bug 1859314 - rhv-log-collector-analyzer --json fails with TypeError
Summary: rhv-log-collector-analyzer --json fails with TypeError
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhv-log-collector-analyzer
Version: 4.4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.4.3
: 4.4.3
Assignee: Sandro Bonazzola
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On: 1866981 1885976
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-21 17:22 UTC by Guilherme Santos
Modified: 2020-11-24 13:09 UTC (History)
4 users (show)

Fixed In Version: rhv-log-collector-analyzer-1.0.3-1.el8ev
Doc Type: Bug Fix
Doc Text:
Previously, unicode strings were not handled properly by the rhv-log-collector-analyzer after porting to python3. In this release, unicode strings are now handled properly.
Clone Of:
Environment:
Last Closed: 2020-11-24 13:09:25 UTC
oVirt Team: Integration
Target Upstream Version:
gdeolive: testing_plan_complete+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:5179 0 None None None 2020-11-24 13:09:49 UTC

Description Guilherme Santos 2020-07-21 17:22:42 UTC
Description of problem:
# rhv-log-collector-analyzer --json
Traceback (most recent call last):
  File "/usr/bin/engine-db-query", line 280, in <module>
    sys.exit(main())
  File "/usr/bin/engine-db-query", line 272, in main
    knowledge_base=args.kb_url
  File "/usr/lib/python3.6/site-packages/engine_db_query/__init__.py", line 213, in execute
    knowledge_base=knowledge_base
  File "/usr/lib/python3.6/site-packages/engine_db_query/__init__.py", line 383, in query_return_json
    s=hashlib.sha256(file_name).hexdigest(),
TypeError: Unicode-objects must be encoded before hashing
b''

Version-Release number of selected component (if applicable):
rhv-log-collector-analyzer-1.0.2-1.el8ev.noarch
ovirt-engine-4.4.1.8-0.7.el8ev.noarch

How reproducible:
always

Steps to Reproduce:
1. # rhv-log-collector-analyzer --json
2.
3.

Actual results:
fails

Expected results:
succeed

Additional info:

Comment 2 Michal Skrivanek 2020-08-26 18:45:12 UTC
too late for 4.4.2, isn't it?

Comment 3 Sandro Bonazzola 2020-08-27 05:41:23 UTC
(In reply to Michal Skrivanek from comment #2)
> too late for 4.4.2, isn't it?

right, sad to have to postpone a bug because of technical issues preventing patches being merged.

Comment 7 Guilherme Santos 2020-10-26 13:48:13 UTC
Verified on:
rhv-log-collector-analyzer-1.0.5-1.el8ev.noarch
ovirt-engine-4.4.3-0.1.el8ev.noarch

Steps:
# rhv-log-collector-analyzer --json

Results:
Run went fine and json generated successfully

Comment 8 Eli Marcus 2020-11-22 19:35:19 UTC
Hi Sandro, please review this doc text for the errata and release notes: 

Previously, unicode strings were not handled properly by the rhv-log-collector-analyzer after porting to python3. 
In this release, unicode strings are now handled properly.

Comment 9 Sandro Bonazzola 2020-11-23 08:12:37 UTC
(In reply to Eli Marcus from comment #8)
> Hi Sandro, please review this doc text for the errata and release notes: 
> 
> Previously, unicode strings were not handled properly by the
> rhv-log-collector-analyzer after porting to python3. 
> In this release, unicode strings are now handled properly.

Looks good to me.

Comment 13 errata-xmlrpc 2020-11-24 13:09:25 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 (Low: Red Hat Virtualization security, bug fix, and enhancement update), 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/RHSA-2020:5179


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