Bug 1305819 - sign websocket proxy ticket via RESTapi with power off VM cause an engine exception
sign websocket proxy ticket via RESTapi with power off VM cause an engine exc...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.6.3
Unspecified Unspecified
unspecified Severity low
: ovirt-4.0.0-beta
: ---
Assigned To: Tomas Jelinek
Petr Kubica
:
: 1311067 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-09 05:20 EST by Petr Kubica
Modified: 2016-05-19 03:47 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-19 03:47:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Kubica 2016-02-09 05:20:37 EST
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 03:11:00 EST
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 03:53:30 EST
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 03:01:50 EDT
*** Bug 1311067 has been marked as a duplicate of this bug. ***
Comment 5 Michal Skrivanek 2016-03-14 03:02:49 EDT
don't forget to check the flow in bug 1311067
Comment 6 Yaniv Lavi 2016-05-09 07:05:41 EDT
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.
Comment 9 Tomas Jelinek 2016-05-19 03:47:35 EDT
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.