Bug 1591271 - Get Internal Server Error while trying to get graphic console, while VM suspending
Summary: Get Internal Server Error while trying to get graphic console, while VM suspe...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.2.6
: 4.2.6
Assignee: Ori Liel
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-14 12:35 UTC by biakymet
Modified: 2018-09-03 15:10 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.2.6
Clone Of:
Environment:
Last Closed: 2018-09-03 15:10:07 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
Engine log (1.02 KB, text/plain)
2018-06-14 12:35 UTC, biakymet
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 92386 0 master MERGED restapi: Error Getting Vm Console When Vm Suspended 2018-07-02 09:55:49 UTC
oVirt gerrit 93111 0 ovirt-engine-4.2 MERGED restapi: Error Getting Vm Console When Vm Suspended 2018-07-31 07:53:42 UTC

Description biakymet 2018-06-14 12:35:34 UTC
Created attachment 1451344 [details]
Engine log

Description of problem:
I got:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
with empty response body, while trying to get graphic console, while VM is suspending.

Version-Release number of selected component (if applicable):
Version 4.3.0-0.0.master.20180612172344.git9643156.el7


How reproducible:
Every time

Steps to Reproduce:
1. Start VM
2. Suspend http://localhost:3000/api/vms/<vm-id>/suspend
3. And get console http://localhost:3000/api/vms/<vm-id>/graphicsconsoles/<console-id>

Actual results:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Expected results:
Graphic console file

Comment 1 Ori Liel 2018-06-18 10:46:07 UTC
The Engine considers the VM not qualified for a console connection because it is suspended and fails the command on purpose. It issues a clear failure message in the log: "Operation Failed: Vm <vm_name> is not running". 

Seems to me that the fix should be to fail the request gracefully, returning an error with status CONFLICT and displaying the error message.

This is in contrast to what's written under "Expected results", which is that the graphics console should be returned. Could you please address this?

Comment 2 biakymet 2018-06-20 10:14:33 UTC
(In reply to Ori Liel from comment #1)
> The Engine considers the VM not qualified for a console connection because
> it is suspended and fails the command on purpose. It issues a clear failure
> message in the log: "Operation Failed: Vm <vm_name> is not running". 

> Seems to me that the fix should be to fail the request gracefully, returning an > error with status CONFLICT and displaying the error message.

Yes, it would be nice if error would be more clearer then just 500 (Internal Server Error).

Comment 3 Petr Matyáš 2018-08-07 11:21:25 UTC
Verified on ovirt-engine-4.2.6-0.1.el7ev.noarch


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