Bug 1158010 - Add new vm from template with cdrom payload via create fail on JsonMappingException
Summary: Add new vm from template with cdrom payload via create fail on JsonMappingExc...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 3.5.0
Assignee: Shahar Havivi
QA Contact: Ilanit Stein
URL:
Whiteboard: virt
Depends On:
Blocks: rhev35rcblocker rhev35gablocker
TreeView+ depends on / blocked
 
Reported: 2014-10-28 09:46 UTC by Ilanit Stein
Modified: 2015-02-17 10:50 UTC (History)
12 users (show)

Fixed In Version: vt9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 08:29:49 UTC
oVirt Team: ---


Attachments (Terms of Use)
test logs (see failing add vm trial @ 9:35 in engine.log) (1.14 MB, application/x-bzip)
2014-10-28 09:59 UTC, Ilanit Stein
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 34584 master MERGED Engine: set device-id in payload constructor Never
oVirt gerrit 34629 ovirt-engine-3.5 MERGED Engine: set device-id in payload constructor Never

Description Ilanit Stein 2014-10-28 09:46:36 UTC
Description of problem:
Add vm from template, with cdrom payload fail on:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>org.apache.commons.lang.SerializationException: org.codehaus.jackson.map.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.ovirt.engine.core.common.action.VmManagementParametersBase["vmPayload"]-&gt;org.ovirt.engine.core.common.businessentities.VmPayload["deviceId"])</detail>
</fault>

It was discovered in payload automatic test: 
http://jenkins.qa.lab.tlv.redhat.com:8080/view/Compute/view/3.5-git/view/Dashboard/job/3.5-git-compute-virt-payloads-nfs/
and also restored manually

Version-Release number of selected component (if applicable):
VT7
(On VT6 it worked fine).

How reproducible:
100%

Steps to Reproduce (via REST api):
Create vm from template with cdrom payload (The template used in the automatic test is sealed rhel based, but on manual reproduce, same failure occur with some basic template, with nothing installed on it):
 
url: https://<engine fqdn>:443/ovirt-engine/api/vms/

method: POST

body:
<vm>
  <name>test_payload_by_poster</name>
  <cluster>
    <name>golden_env_mixed_1</name>
  </cluster>
  <template>
    <name>golden_mixed_virtio</name>
  </template>
    <payloads>
        <payload type="cdrom">
            <files>
                <file>
                    <name>payload.cdrom</name>
                    <content>cdrom payload via create</content>
                </file>
            </files>
        </payload>
    </payloads>
</vm>

Actual results:
1. VM creation operation failed with the error in description.
2. VM is seen in UI, stuck in lock status, and it's disk also locked.

Expected results:
VM should have been created.

Comment 1 Ilanit Stein 2014-10-28 09:59:02 UTC
Created attachment 951339 [details]
test logs (see failing add vm trial @ 9:35 in engine.log)

Comment 3 Ilanit Stein 2014-10-29 12:04:42 UTC
1. Same VM creation problem occur with floppy payload.
2. Add VM with no payload, and then update it to have cdrom/floppy payload work fine.

Comment 4 Ilanit Stein 2014-12-21 10:51:10 UTC
Verified on vt13.4, on automatic test:

http://jenkins.qa.lab.tlv.redhat.com:8080/view/Compute/view/3.5-git/view/Virt/job/3.5-git-compute-virt-payloads-nfs/142/

Now same cases that failed due to this bug, now pass.

Comment 5 Omer Frenkel 2015-02-17 08:29:49 UTC
RHEV-M 3.5.0 has been released


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