Description of problem: rhv-log-collector-analyzer --json shows this error: 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 NOTE: do not affect --live
*** Bug 1882702 has been marked as a duplicate of this bug. ***
# rhv-analyzer-insights Executing rhv-log-collector-analyzer... Traceback (most recent call last): File "/usr/bin/rhv-analyzer-insights", line 122, in <module> f.write(json_output) TypeError: write() argument must be str, not bytes # yum list rhv-log-collector-analyzer Updating Subscription Management repositories. Last metadata expiration check: 0:41:46 ago on Wed 07 Oct 2020 12:41:41 PM CEST. Installed Packages rhv-log-collector-analyzer.noarch 1.0.4-1.el8ev
(In reply to Pavol Brilla from comment #5) > # rhv-analyzer-insights > Executing rhv-log-collector-analyzer... > Traceback (most recent call last): > File "/usr/bin/rhv-analyzer-insights", line 122, in <module> > f.write(json_output) > TypeError: write() argument must be str, not bytes > # yum list rhv-log-collector-analyzer > Updating Subscription Management repositories. > Last metadata expiration check: 0:41:46 ago on Wed 07 Oct 2020 12:41:41 PM > CEST. > Installed Packages > rhv-log-collector-analyzer.noarch 1.0.4-1.el8ev was engine-db-query-1.6.2 installed?
Enforcing the requirement on engine-db-query >= 1.6.2
(In reply to Pavol Brilla from comment #5) > # rhv-analyzer-insights > Executing rhv-log-collector-analyzer... > Traceback (most recent call last): > File "/usr/bin/rhv-analyzer-insights", line 122, in <module> > f.write(json_output) > TypeError: write() argument must be str, not bytes Now noticed, this is on a different binary, original bug was reported against engine-db-query, this one is on rhv-analyzer-insights. Moving this bug back to ON_QA, opening a different one for above report. > # yum list rhv-log-collector-analyzer > Updating Subscription Management repositories. > Last metadata expiration check: 0:41:46 ago on Wed 07 Oct 2020 12:41:41 PM > CEST. > Installed Packages > rhv-log-collector-analyzer.noarch 1.0.4-1.el8ev
yes it was yum list engine-db-query Installed Packages engine-db-query.noarch 1.6.2-1.el8ev
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
Hi Sandro, please review this doc text for the errata and release notes: Previously, unicode strings were not handled properly by the ovirt-engine-db-query after porting to Python3. In this release, unicode strings are now handled properly.
(In reply to Eli Marcus from comment #11) > Hi Sandro, please review this doc text for the errata and release notes: > > Previously, unicode strings were not handled properly by the > ovirt-engine-db-query after porting to Python3. > In this release, unicode strings are now handled properly. looks good to me
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