Bug 1359885
| Summary: | [API v3] Adding a vm with payload fails with internal server error | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | sefi litmanovich <slitmano> | ||||
| Component: | RestAPI | Assignee: | Juan Hernández <juan.hernandez> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Lucie Leistnerova <lleistne> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 4.0.0 | CC: | bugs, gklein, lleistne, lsvaty, michal.skrivanek, sbonazzo | ||||
| Target Milestone: | ovirt-4.0.2 | Keywords: | Regression, ZStream | ||||
| Target Release: | 4.0.2.4 | Flags: | rule-engine:
ovirt-4.0.z+
rule-engine: blocker+ rule-engine: planning_ack+ rule-engine: devel_ack+ rule-engine: testing_ack+ |
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | 4.0.2-5 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-08-12 14:24:57 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP. I have substituted in the given XML {cluster_id} and {template_id} with existing IDs
API returned:
HTTP/1.1 400 Bad Request
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<usage_message>
<message>Request syntactically incorrect. See the description below for the correct usage:</message>
<detailedLink href="/ovirt-engine/api/vms" rel="add">
...
because of missing end tag </cluster>
with correct cluster element:
<cluster id="{cluster_id}" />
VM was created succesfully
verified in ovirt-engine-restapi-4.0.2.6-0.1.el7ev.noarch
|
Created attachment 1183854 [details] engine + server logs Description of problem: Trying to create a vm with a payload on v3 API fails with internal error. Failure isn't reflected in engine.log but server.log has a long trace starting with: 2016-07-25 17:57:06,488 ERROR [io.undertow.request] (default task-9) UT005023: Exception handling request to /ovirt-engine/api/v3/vms/: java.lang.RuntimeException: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Can 't find V3 input adapter of class "org.ovirt.engine.api.v3.adapters.V3PayloadsInAdapter" for object of class "org.ovirt.engine.api.v3.types.V3Payloads" Re produced on 2 different envs. Creation of vm with payload works fine with API v4. Version-Release number of selected component (if applicable): rhevm-4.0.2-0.2.rc1.el7ev.noarch How reproducible: always Steps to Reproduce: 1. Try to create a vm with payload via api v3 e.g. with the following message body: <vm> <name>CreateVmWithCdromPayload</name> <os type="rhel_6x64"/> <cluster id="{cluster_id}"> <display> <type>spice</type> </display> <template id="{template_id}"/> <payloads> <payload type="cdrom"> <files> <file> <name>payload.cdrom</name> <content>cdrom payload via create</content> </file> </files> </payload> </payloads> </vm> Actual results: Response code 500 Internal server error Expected results: Vm should be created successfully and if not, some informative message should raise. Additional info: