Bug 982265 - RESTAPI: Wrong response to import request
Summary: RESTAPI: Wrong response to import request
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.3.0
Assignee: Ravi Nori
QA Contact: Dušan Kajan
Whiteboard: infra
Depends On:
TreeView+ depends on / blocked
Reported: 2013-07-08 14:03 UTC by Dušan Kajan
Modified: 2016-02-10 19:17 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-09-03 07:32:05 UTC
oVirt Team: Infra
Target Upstream Version:

Attachments (Terms of Use)
engine log from setup (7.22 KB, text/plain)
2013-07-08 14:03 UTC, Dušan Kajan
no flags Details
full engine log (1.13 MB, text/x-log)
2013-07-09 09:28 UTC, Dušan Kajan
no flags Details

Description Dušan Kajan 2013-07-08 14:03:44 UTC
Created attachment 770509 [details]
engine log from setup

Description of problem:
I have tried to import new VM using restapi, the request is handled correctly in rhevm and it starts the import, but after a 2 minutes it send wrong response (possible some time out expired)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Have correct setup with datacenter, host, data storage and export storage
2. Send request for import via curl
(I used this one http://pastebin.test.redhat.com/151067)

Actual results:
response 500 - internal server error (http://pastebin.test.redhat.com/151067)

Expected results:
should send the right answer conteding the result of import

Additional info:
The VM continues to import and the import eventuelly end with success, engine.log in attachement. This used to work in 3.2 and earlier

Comment 1 Michal Skrivanek 2013-07-09 08:13:04 UTC
the link in step 2 should actually be http://pastebin.test.redhat.com/151065
can you please attach relevant engine.log and not just few seconds excerpt?
How long does it take to complete the import, is the VM exceptionally large or why does it take so long?
Is CI test passing (I suppose there is one)?

Comment 2 Dušan Kajan 2013-07-09 09:28:47 UTC
Created attachment 770873 [details]
full engine log

Comment 3 Dušan Kajan 2013-07-09 10:05:49 UTC
The import takes more time (approximatly 15-20 minutes), the VM is Windows7 34 bit, with a few installed programms.
The test on Jenkins failed as well, thats the problem - it imported the VM but, ended with failure before the action was completed

Comment 4 Dušan Kajan 2013-07-09 15:07:11 UTC
It is a regresion, worked in 3.2
I ran the command using curl, it start an action, then there was a delay (about 2 minutes), then it recieved the 500 error code, there is no log in engine.log showing that this had happened (only start of action, no response or error later)

Comment 8 Dušan Kajan 2013-08-20 13:32:57 UTC
yes on is9.1 and is10 is the same problem - plus I am not able to import VM as well - the same issue

Comment 9 Ravi Nori 2013-08-26 22:33:18 UTC
I am unable to see the contents on pastebin with the command below everything works fine (can't reproduce error)

I am executing import from export domain on a 40gb preallocated disk VM with windows server 2008 installed. The import takes 40 minutes on my laptop but everything seems to be working properly

curl -v -X POST -d @11_import_vm.xml -u admin@internal:letmein! -H "Accept: application/xml" -H "Content-Type: application/xml"

File contents of 11_import_vm.xml

<cluster id="9688823a-b255-45f7-a124-d99ba17762d5"/>

I need the orginal command executed that causes the exception

Comment 10 Dušan Kajan 2013-08-28 09:47:01 UTC

this is the body of request send by RESTAPI, was run on jenkins, the response was 

2013-08-21 14:28:10,287 - MainThread - templates - DEBUG - Response body for action request is: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
 root@localhost and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<address>Apache/2.2.22 (Red Hat Enterprise Web Server) Server at jenkins-vm-03.scl.lab.tlv.redhat.com Port 443</address>

Comment 11 Ravi Nori 2013-08-29 13:22:36 UTC
Can you also list the curl command you used.

Comment 13 Michael Pasternak 2013-09-03 07:32:05 UTC
since it cannot be reproduced on the latest, closing this bz

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