Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1967169

Summary: rhv-log-collector-analyzer --json fails with AttributeError
Product: Red Hat Enterprise Virtualization Manager Reporter: Guilherme Santos <gdeolive>
Component: rhv-log-collector-analyzerAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED ERRATA QA Contact: Guilherme Santos <gdeolive>
Severity: medium Docs Contact:
Priority: high    
Version: 4.4.6CC: emarcus, lleistne, michal.skrivanek, sbonazzo
Target Milestone: ovirt-4.4.7Keywords: FieldEngineering, ZStream
Target Release: 4.4.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhv-log-collector-analyzer-1.0.10 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1859314 Environment:
Last Closed: 2021-07-22 15:13:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Guilherme Santos 2021-06-02 14:31:35 UTC
Description of problem:
# rhv-log-collector-analyzer --json
Traceback (most recent call last):
  File "/usr/bin/rhv-log-collector-analyzer-live", line 259, in <module>
    sys.exit(main())
  File "/usr/bin/rhv-log-collector-analyzer-live", line 221, in main
    info_data = info_system(cmd)
  File "/usr/bin/rhv-log-collector-analyzer-live", line 147, in info_system
    ret = info_name(cmd)
  File "/usr/lib/python3.6/site-packages/rhv_log_collector_analyzer/engine.py", line 47, in current_version
    desc_type)
  File "/usr/lib/python3.6/site-packages/rhv_log_collector_analyzer/misc.py", line 185, in query_data
    ret = ret.decode("utf-8")
AttributeError: 'str' object has no attribute 'decode'

Version-Release number of selected component (if applicable):
rhv-log-collector-analyzer-1.0.8-1.el8ev.noarch
ovirt-engine-4.4.6.6-0.10.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 1 Sandro Bonazzola 2021-06-16 08:18:48 UTC
Reproduced on a clean setup with 4.4.6 released content:
rpm -qv rhv-log-collector-analyzer engine-db-query
rhv-log-collector-analyzer-1.0.8-1.el8ev.noarch
engine-db-query-1.6.3-1.el8ev.noarch

Reproduced also on 4.4.7 candidate: rhv-log-collector-analyzer-1.0.9-1.el8ev.noarch

Comment 5 Guilherme Santos 2021-06-28 18:11:32 UTC
Verified on:
ovirt-engine-4.4.7.4-0.9.el8ev.noarch

`rhv-log-collector-analyzer --json` works as expected

Comment 10 errata-xmlrpc 2021-07-22 15:13:32 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 (Moderate: RHV Manager (ovirt-engine) security update [ovirt-4.4.7]), 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-2021:2865