Bug 1855221

Summary: Setup on separate machine with "manual_files" is broken
Product: [oVirt] ovirt-engine Reporter: Yedidyah Bar David <didi>
Component: Setup.EngineCommonAssignee: Yedidyah Bar David <didi>
Status: CLOSED CURRENTRELEASE QA Contact: Guilherme Santos <gdeolive>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.4.1CC: bugs, michal.skrivanek
Target Milestone: ovirt-4.4.2Flags: sbonazzo: ovirt-4.4?
sbonazzo: planning_ack?
sbonazzo: devel_ack+
pm-rhel: testing_ack+
Target Release: 4.4.2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.2.1 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-18 07:13:05 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:

Description Yedidyah Bar David 2020-07-09 09:39:09 UTC
Description of problem:

Setup of Websocket-Proxy or Grafana on a separate machine, and then choosing "manual_files" when asked about how to access the engine, fails with:

[ERROR] Failed to execute stage 'Misc configuration': a bytes-like object is required, not 'str'

With this in the log:

2020-07-09 09:46:03,426+0200 DEBUG otopi.transaction transaction._prepare:66 exception during prepare phase
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/otopi/transaction.py", line 62, in _prepare
    element.prepare()
  File "/usr/lib/python3.6/site-packages/otopi/filetransaction.py", line 253, in prepare
    os.write(fd, self._content)
TypeError: a bytes-like object is required, not 'str'
2020-07-09 09:46:03,429+0200 DEBUG otopi.context context._executeMethod:145 method exception
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/websocket_proxy/pki.py", line 175, in _misc_pki
    uninstall_group_desc='WSP PKI keys',
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/remote_engine.py", line 465, in add_to_transaction
    modifiedList=uninstall_files,
  File "/usr/lib/python3.6/site-packages/otopi/transaction.py", line 106, in append
    self._prepare(element=element)
  File "/usr/lib/python3.6/site-packages/otopi/transaction.py", line 62, in _prepare
    element.prepare()
  File "/usr/lib/python3.6/site-packages/otopi/filetransaction.py", line 253, in prepare
    os.write(fd, self._content)
TypeError: a bytes-like object is required, not 'str'

Version-Release number of selected component (if applicable):
Current master

How reproducible:
Always

Steps to Reproduce:
1. See above
2.
3.

Actual results:
See above

Expected results:
Works

Additional info:

This is actually part of bug 1624732, but I didn't test manual_files so didn't notice. I am opening current bug to prevent postponing bug 1624732.

Comment 1 Sandro Bonazzola 2020-07-09 11:11:28 UTC
Do you think this is worth a 4.4.1 async?

Comment 2 Yedidyah Bar David 2020-07-09 12:44:52 UTC
(In reply to Sandro Bonazzola from comment #1)
> Do you think this is worth a 4.4.1 async?

No, because IMO almost no-one uses manual_files. However, if we do release an async, can include this there.

Comment 3 Michal Skrivanek 2020-07-10 04:38:29 UTC
not a blocker -> 4.4.2

Comment 4 Guilherme Santos 2020-08-27 09:54:30 UTC
Verified on:
ovirt-engine-4.4.2.3-0.6.el8ev.noarch
ovirt-engine-websocket-proxy-4.4.2.3-0.6.el8ev.noarch

Steps:
1. Installed rhv on a machine without websocket
2. Installed websocket on a different machine selecting manual_files method

Results:
Installation done successfully and websocket working as expected

Comment 5 Sandro Bonazzola 2020-09-18 07:13:05 UTC
This bugzilla is included in oVirt 4.4.2 release, published on September 17th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.