Bug 1158010

Summary: Add new vm from template with cdrom payload via create fail on JsonMappingException
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilanit Stein <istein>
Component: ovirt-engineAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.5.0CC: aberezin, ecohen, gklein, iheim, lpeer, lsurette, mavital, michal.skrivanek, ofrenkel, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: AutomationBlocker, Regression, Triaged
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: vt9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 08:29:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1164308, 1164311    
Attachments:
Description Flags
test logs (see failing add vm trial @ 9:35 in engine.log) none

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