Bug 1305837 - sign websocket proxy ticket via RESTapi when VM have VNC graphics protocol
Summary: sign websocket proxy ticket via RESTapi when VM have VNC graphics protocol
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.6.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-3.6.5
: 3.6.5
Assignee: Tomas Jelinek
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-09 11:30 UTC by Petr Kubica
Modified: 2016-05-01 07:40 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: It was not possible to get a signed websocket proxy ticket using REST API Consequence: Third party clients built on top of REST API were not able to connect to SPICE HTML5 nor to noVNC due to missing websocket proxy ticket Fix: Added support for signing the websocket proxy ticket using REST API Result: Now it is possible to build third party clients connecting to web consoles
Clone Of:
Environment:
Last Closed: 2016-04-25 14:30:28 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 53431 0 master MERGED core: sign websocket ticket did not work for VNC 2016-02-22 11:40:10 UTC
oVirt gerrit 53822 0 ovirt-engine-3.6 MERGED core: sign websocket ticket did not work for VNC 2016-02-28 13:25:34 UTC

Description Petr Kubica 2016-02-09 11:30:01 UTC
Description of problem:
If I understand it correctly https://bugzilla.redhat.com/show_bug.cgi?id=1181030
sign websocket proxy ticket via RESTapi doesn't work with VNC as expected.

When I tried to sign the websocket proxy ticket via RESTapi when the VM have set VNC graphics protocol, api returned 500 Internal server error and thrown an exception to engine.log

2016-02-09 12:21:36,006 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-2) [] Operation Failed: 
2016-02-09 12:21:36,006 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-2) [] Exception: org.ovirt.engine.api.restapi.resource.BaseBackendResource$BackendFailureException: 
...

Version-Release number of selected component (if applicable):
rhevm-restapi-3.6.3-0.1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Have a VM with VNC graphics protocol UP
2. try to sign websocket proxy ticket via RESTapi
POST /vms/{vmid}/graphicsconsoles/{consoleid}/proxyticket
<action> <proxy_ticket> <value>ticket_content</value> </proxy_ticket> </action>
3. Check returned code and engine.log

Actual results:
500 Internal server error with exception in engine.log

Expected results:
Fail with right code without exception
Maybe with description message that VM have unsupported graphics protocol (or something else)

Additional info:
Attached engine.log

Comment 2 Tomas Jelinek 2016-02-11 10:00:34 UTC
It actually should work also for VNC (because of the noVNC). The problem is that the code does not handle the case when the tls_port is not set at all (which is the case for VNC).

Comment 3 meital avital 2016-04-11 08:32:34 UTC
Verified rhevm-3.6.5.1-0.1.el6

Verified  Steps:
1. Have a VM with VNC graphics protocol UP
2. try to sign websocket proxy ticket via RESTapi 
POST https://EngineIP/ovirt-engine/api/vms/aa011383-ece0-4a69-a5f1-63c3ec6234e5/graphicsconsoles/564e43/proxyticket

<action> <proxy_ticket> <value>ticket_content</value> </proxy_ticket> </action>

3. Check returned code -> Status Code: 200 OK

Comment 4 Eyal Edri 2016-04-25 14:30:28 UTC
3.6.5 released


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