Bug 1305819 - sign websocket proxy ticket via RESTapi with power off VM cause an engine exception
Summary: sign websocket proxy ticket via RESTapi with power off VM cause an engine exc...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.6.3
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.0.0-beta
: ---
Assignee: Tomas Jelinek
QA Contact: Petr Kubica
URL:
Whiteboard:
: 1311067 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-09 10:20 UTC by Petr Kubica
Modified: 2016-05-19 07:47 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-19 07:47:35 UTC
oVirt Team: Virt
Target Upstream Version:


Attachments (Terms of Use)

Description Petr Kubica 2016-02-09 10:20:37 UTC
Description of problem:
sign websocket proxy ticket via RESTapi with power off VM cause an engine exception

2016-02-09 11:04:52,430 ERROR [org.ovirt.engine.core.bll.GetSignedWebsocketProxyTicketQuery] (ajp-/127.0.0.1:8702-7) [] Query 'GetSignedWebsocketProxyTicketQuery' failed: EngineException: vmid=18c40117-9c2b-4840-a9a0-da07c8682a6e console=SPICE (Failed with error GraphicsConsoleCantBeObtained and code 5062)
2016-02-09 11:04:52,430 ERROR [org.ovirt.engine.core.bll.GetSignedWebsocketProxyTicketQuery] (ajp-/127.0.0.1:8702-7) [] Exception: org.ovirt.engine.core.common.errors.EngineException: EngineException: vmid=18c40117-9c2b-4840-a9a0-da07c8682a6e console=SPICE (Failed with error GraphicsConsoleCantBeObtained and code 5062)
	at org.ovirt.engine.core.bll.GetSignedWebsocketProxyTicketQuery.getGraphicsInfo(GetSignedWebsocketProxyTicketQuery.java:63) [bll.jar:]

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

How reproducible:
100%

Steps to Reproduce:
1. Create VM
2. Try to sing websocket proxy ticket via RESTapi
POST /vms/{vmid}/graphicsconsoles/{consoleid}/proxyticket
<action> <proxy_ticket> <value>ticket_content</value> </proxy_ticket> </action>
3. 

Actual results:
Failed with exception

Expected results:
Failed without exception (in log)

Additional info:
Attached engine log

Comment 2 Yaniv Kaul 2016-02-10 08:11:00 UTC
Tomas - why do we need to fix this at all? Is this an interesting scenario? Any harm done to the backend? It's a negative, corner-case scenario.

Comment 3 Tomas Jelinek 2016-02-10 08:53:30 UTC
No harm on backend - it is a cosmetic issue that the user will not get the proper message, just an exception on the backend. But considering it is an API call, it may happen.
The fix should be trivial, I don't see a reason why not consider it for 4.0

Comment 4 Michal Skrivanek 2016-03-14 07:01:50 UTC
*** Bug 1311067 has been marked as a duplicate of this bug. ***

Comment 5 Michal Skrivanek 2016-03-14 07:02:49 UTC
don't forget to check the flow in bug 1311067

Comment 6 Yaniv Lavi 2016-05-09 11:05:41 UTC
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.

Comment 9 Tomas Jelinek 2016-05-19 07:47:35 UTC
After more investigation I see that the API response is:

<fault>
    <detail>Graphics console can't be obtained. Is vm ready for connecting to console?</detail>
    <reason>Operation Failed</reason>
</fault>

which is a descriptive response. The engine exception is not a mistake - it is implemented intentionally and properly caught and handled.

Closing as not a bug.


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