Bug 1866981
| Summary: | obj must be encoded before hashing | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Douglas Schilling Landgraf <dougsland> | |
| Component: | ovirt-engine-db-query | Assignee: | Sandro Bonazzola <sbonazzo> | |
| Status: | CLOSED ERRATA | QA Contact: | Guilherme Santos <gdeolive> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 4.4.0 | CC: | emarcus, lleistne, pbrilla, sbonazzo | |
| Target Milestone: | ovirt-4.4.3 | Keywords: | FieldEngineering, Rebase, ZStream | |
| Target Release: | 4.4.3 | Flags: | gdeolive:
testing_plan_complete+
|
|
| Hardware: | All | |||
| OS: | All | |||
| Whiteboard: | ||||
| Fixed In Version: | engine-db-query-1.6.2 | Doc Type: | Bug Fix | |
| Doc Text: |
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.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1885976 (view as bug list) | Environment: | ||
| Last Closed: | 2020-11-24 13:09:25 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | Integration | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1859314, 1885976 | |||
*** 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 |
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