Bug 1835642

Summary: WebSocket Proxy deployment on separate host fails to match public keys
Product: [oVirt] ovirt-engine Reporter: Asaf Rachmani <arachman>
Component: WebSocket ProxyAssignee: Vinzenz Feenstra [evilissimo] <vfeenstr>
WebSocket Proxy sub component: General QA Contact: meital avital <mavital>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified    
Version: 4.4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-14 09:10:30 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: 1624732    
Bug Blocks:    

Description Asaf Rachmani 2020-05-14 08:57:47 UTC
Description of problem:
WebSocket Proxy deployment on separate host fails with the following error:
[ ERROR ] Failed to sign WebSocket Proxy certificate on engine server
          Trying again...


ovirt-engine-setup log:
2020-05-14 03:53:28,548-0400 DEBUG otopi.plugins.otopi.dialog.human human.queryString:159 query SSH_ACCESS_REMOTE_ENGINE_PORT
2020-05-14 03:53:28,550-0400 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND                 ssh port on remote engine server [22]: 
2020-05-14 03:53:29,020-0400 DEBUG otopi.plugins.otopi.dialog.human human.queryString:159 query SSH_ACCESS_REMOTE_ENGINE_PASSWORD
2020-05-14 03:53:29,021-0400 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND                 root password on remote engine server engine8.asrachmani.com: 
/usr/lib/python3.6/site-packages/paramiko/client.py:837: UserWarning: Unknown ssh-ed25519 host key for engine8.asrachmani.com: b'10f5c70e9d628bb8f1b756a8670f3036'
  key.get_name(), hostname, hexlify(key.get_fingerprint())
2020-05-14 03:53:31,413-0400 INFO otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine remote_engine._enroll_cert_auto_ssh:245 Signing the WebSocket Proxy certificate on the engine server
2020-05-14 03:53:31,414-0400 DEBUG otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh remote_engine_root_ssh.copy_to_engine:258 Copying data to remote engine engine8.asrachmani.com:/etc/pki/ovirt-engine/requests/w
ebsocket-proxy-websoket.asrachmani.com.req
2020-05-14 03:53:31,594-0400 DEBUG otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh remote_engine_root_ssh.execute_on_engine:187 Executing on remote engine engine8.asrachmani.com:  /usr/share/ovirt-engine/bin/pk
i-enroll-request.sh \
     --name=websocket-proxy-websoket.asrachmani.com \
     --subject="$(openssl x509 -in /etc/pki/ovirt-engine/ca.pem -text | sed -n 's; *DirName:\(.*\)/CN=.*;\1;p')/CN=websoket.asrachmani.com"
2020-05-14 03:53:32,602-0400 DEBUG otopi.plugins.ovirt_engine_common.base.remote_engine.remote_engine_root_ssh remote_engine_root_ssh.copy_from_engine:231 Copying data from remote engine engine8.asrachmani.com:/etc/pki/ovirt-engine/certs/
websocket-proxy-websoket.asrachmani.com.cer
2020-05-14 03:53:32,683-0400 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND                 Trying again...
2020-05-14 03:53:33,490-0400 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 117, in _customization
    self._enrolldata.enroll_cert()
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/remote_engine.py", line 499, in enroll_cert
    }[self._remote_engine.style().name]()
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/remote_engine.py", line 343, in _enroll_cert_auto_ssh
    time.sleep(10)
  File "/usr/lib/python3.6/site-packages/otopi/main.py", line 53, in _signal
    raise RuntimeError("SIG%s" % signum)
RuntimeError: SIG2
2020-05-14 03:53:33,492-0400 ERROR otopi.context context._executeMethod:154 Failed to execute stage 'Environment customization': SIG2
2020-05-14 03:53:33,492-0400 DEBUG otopi.context context.dumpEnvironment:765 ENVIRONMENT DUMP - BEGIN



Version-Release number of selected component (if applicable):
ovirt-engine-websocket-proxy-4.4.0-1.el8.noarch
ovirt-engine-4.4.0.1-0.0.master.20200507171742.gitbf0c2d50fbf.el8.noarch

Steps to Reproduce:
1. Install engine with no WebSocket Proxy.
2. Install WebSocketProxy on a separate host.

Actual results:
WebSocketProxy deployment fails

Expected results:
WebSocketProxy deployment succeeds

Comment 1 Asaf Rachmani 2020-05-14 09:10:30 UTC

*** This bug has been marked as a duplicate of bug 1626064 ***