Bug 982265 - RESTAPI: Wrong response to import request
RESTAPI: Wrong response to import request
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.3.0
Assigned To: Ravi Nori
Dušan Kajan
infra
: Regression, TestBlocker, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 10:03 EDT by Dušan Kajan
Modified: 2016-02-10 14:17 EST (History)
13 users (show)

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


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

  None (edit)
Description Dušan Kajan 2013-07-08 10:03:44 EDT
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):
is4

How reproducible:
100%

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)
3.

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 04:13:04 EDT
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 05:28:47 EDT
Created attachment 770873 [details]
full engine log
Comment 3 Dušan Kajan 2013-07-09 06:05:49 EDT
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 11:07:11 EDT
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 09:32:57 EDT
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 18:33:18 EDT
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" http://127.0.0.1:8080/api/storagedomains/651363bc-8a08-47d5-b2c9-666bdd1795f1/vms/d0e343d9-8e30-43b4-8d66-c944cdbd9988/import


File contents of 11_import_vm.xml

<action>
<async>false</async>
<cluster id="9688823a-b255-45f7-a124-d99ba17762d5"/>
<storage_domain><name>Data</name></storage_domain>
<vm>
   <name>vm</name>
</vm>
</action>

I need the orginal command executed that causes the exception
Comment 10 Dušan Kajan 2013-08-28 05:47:01 EDT
<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
    <storage_domain>
        <name>nfs_0</name>
    </storage_domain>
    <cluster>
        <name>ClusterForGT</name>
    </cluster>
    <template>
        <name>dk-win7-64</name>
    </template>
    <clone>true</clone>
</action>

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">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<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>
<hr>
<address>Apache/2.2.22 (Red Hat Enterprise Web Server) Server at jenkins-vm-03.scl.lab.tlv.redhat.com Port 443</address>
</body></html>
Comment 11 Ravi Nori 2013-08-29 09:22:36 EDT
Can you also list the curl command you used.
Comment 13 Michael Pasternak 2013-09-03 03:32:05 EDT
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.