Bug 1463277 - NoVNC WS proxy port hardcoded
NoVNC WS proxy port hardcoded
Status: NEW
Product: ovirt-engine
Classification: oVirt
Component: WebSocket Proxy (Show other bugs)
4.1.2.2
x86_64 Linux
unspecified Severity low (vote)
: ovirt-4.3.0
: ---
Assigned To: nobody nobody
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-20 09:26 EDT by Vladimir Rulev
Modified: 2017-10-25 06:33 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
tjelinek: ovirt‑4.3?
tjelinek: planning_ack?
tjelinek: devel_ack?
tjelinek: testing_ack?


Attachments (Terms of Use)

  None (edit)
Description Vladimir Rulev 2017-06-20 09:26:55 EDT
Description of problem:
If I change websocket proxy port from default (6100) noVNC client stops connecting.

Version-Release number of selected component (if applicable):
ovirt-engine-backend-4.1.2.2-1.el7.centos.noarch

How reproducible:
Always

Steps to Reproduce:
1. Change websocket proxy port in /etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf and restart ovirt-websocket-proxy.
2. Set WebSocketProxy by engine-config to new port. Restart ovirt-engine.
3. Select NoVNC in Console options for some VM.
4. Open cosole.

Actual results:
NoVNC client reports it can not connect to port 6100.

Expected results:
Client should use new port specified in URL.

Additional info:
It seems value 6100 is hardcoded in novnc-main.jsp function checkAndConnect():
var url = new URL('wss://' + getHost() + ':6100/' + path);
If I change port here NoVNC connects.

This page should use port from URL, for exsample:
var port = WebUtil.getQueryVar('port', window.location.port);
var url = new URL('wss://' + getHost() + ':' + port + '/' + path);
Comment 1 Tomas Jelinek 2017-06-21 02:49:24 EDT
wow, indeed, it is hardcoded. Even all the other code to handle it properly and pass it to the novnc-main.jsp is there, only the last bit to actually consume is not there.

Note You need to log in before you can comment on or make changes to this bug.