Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 875623

Summary: Cannot run VM that was created and updated with Payload via REST API
Product: Red Hat Enterprise Virtualization Manager Reporter: Tareq Alayan <talayan>
Component: ovirt-engineAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Tareq Alayan <talayan>
Severity: high Docs Contact:
Priority: high    
Version: 3.1.0CC: dyasny, hateya, iheim, italkohe, lpeer, michal.skrivanek, oourfali, oramraz, pstehlik, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: ZStream
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: sf1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 883444 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 883444, 915537    
Attachments:
Description Flags
XMLs for RESTAPI
none
engine.log
none
old yesterday vdsm
none
vdsm-today none

Description Tareq Alayan 2012-11-12 08:36:16 UTC
Description of problem:
The problem is that VMs failed to run in case:
- VM-one have payload CDROM - can run 
- VM-two have payload CDROM - Fail to run 


Steps to Reproduce:
1. Create 2 VM via rest API [create XMLs attached] 
2. update both VMs with payload cdrom [XML attached]
3. from GUI start both VM
  
Actual results:
VM-one starts
Vm-two Fails to start

Expected results:
Both VMs starting

Comment 1 Tareq Alayan 2012-11-12 08:37:02 UTC
Created attachment 643309 [details]
XMLs for RESTAPI

Comment 2 Tareq Alayan 2012-11-12 08:40:00 UTC
Created attachment 643310 [details]
engine.log

Comment 5 Shahar Havivi 2012-11-18 07:56:46 UTC
Cannot reproduce the error...

Tested with the provided payload xml in the first attachment - note that it cannot be the same hash because it calculate by the content and the xml you provides is different (one have 'by2' and the other have 'vm2')

Also tested two VM with the same payload content, both are running.

Tareq, is there other info you can provide?

Comment 6 Shahar Havivi 2012-11-18 08:00:50 UTC
Also, the engine log is not idicating that the error was due to the same hash, how did you com to that conclusion?
It does show that you have an error while starting the VM:

-----------------------------------------------------------
XmlRpcExtensionException: Null values aren't supported, if             isEnabledForExtensions() == false 
-----------------------------------------------------------

But it looks more like arguments error...
Can you reproduce its?
Can you provide the VDSM log as well and point to the line that cause the error (in both logs VDSM and Engine)
Thanks.

Comment 7 Tareq Alayan 2012-11-18 22:37:49 UTC
It is reproducible for me as following:
1. Create VM-1 via RESTapi - POST
2. Update VM-1 with cdrom payload- PUT
3. Start VM from UI -- OK
4. Create Vm-1 - POST
5. Update Vm-2 with cdrom payload - PUT
6. start Vm-2 - RESULT: FAIL

LOG from engine:
================
2012-11-19 00:26:57,458 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand] (ajp-/127.0.0.1:8702-5) [157b767b] XML RPC error in command CreateVDS ( HostName = monique-vds0 ), the error was: java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException, XmlRpcExtensionException: Null values aren't supported, if isEnabledForExtensions() == false 
2012-11-19 00:26:57,459 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.CreateVDSCommand] (ajp-/127.0.0.1:8702-5) [157b767b] FINISH, CreateVDSCommand, log id: 21e37449
2012-11-19 00:26:57,459 ERROR [org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand] (ajp-/127.0.0.1:8702-5) [157b767b] VDS::create Failed creating vm cdrom-update1 in vds = 2f9b9610-316f-11e2-a9f5-001a4a1697ca : monique-vds0 error = org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException: VDSNetworkException: 
2012-11-19 00:26:57,459 INFO  [org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand] (ajp-/127.0.0.1:8702-5) [157b767b] FINISH, CreateVmVDSCommand, return: Down, log id: 7f91f1c9
2012-11-19 00:26:57,459 ERROR [org.ovirt.engine.core.bll.RunVmOnceCommand] (ajp-/127.0.0.1:8702-5) [157b767b] Command org.ovirt.engine.core.bll.RunVmOnceCommand throw Vdc Bll exception. With error message VdcBLLException: null
2012-11-19 00:26:57,465 ERROR [org.ovirt.engine.core.bll.RunVmOnceCommand] (ajp-/127.0.0.1:8702-5) [157b767b] Transaction rolled-back for command: org.ovirt.engine.core.bll.RunVmOnceCommand.
2012-11-19 00:26:57,534 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-5) Operation Failed: [Network error during communication with the Host.]
2012-11-19 00:26:57,536 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (ajp-/127.0.0.1:8702-5) [fd66c3] Running command: LogoutUserCommand internal: false.

Comment 8 Shahar Havivi 2012-11-19 09:31:24 UTC
(In reply to comment #7)
Does it happened without the payload, ie creating two VMs from REST and running them?
Can you attach the VDSM log as well?

Comment 9 Tareq Alayan 2012-11-19 10:30:44 UTC
yes, i can create 2 vms with no update and run them. 

logs attached;

Comment 10 Tareq Alayan 2012-11-19 10:36:12 UTC
Created attachment 647673 [details]
old yesterday vdsm

Comment 11 Tareq Alayan 2012-11-19 10:36:49 UTC
Created attachment 647674 [details]
vdsm-today

Comment 12 Shahar Havivi 2012-11-19 14:36:57 UTC
posted at: http://gerrit.ovirt.org/#/c/9327/

Comment 13 Shahar Havivi 2012-11-20 14:20:08 UTC
The actual bug is creating a VM via REST API,
without starting the VM - now adding (buy updating) Payload to the VM, the VM cannot run.

If we do start the VM prior to adding Payload and then adding Payload and rerunning the VM will run as expected.

The bug is setting the Path value in spec-params to NULL which the XmlRpcStruct cannot handle - it must be empty string.

The Path is the CDROM path and not related to the Payload.

Comment 15 Arik 2012-11-25 13:38:28 UTC
*** Bug 875720 has been marked as a duplicate of this bug. ***

Comment 17 Tareq Alayan 2013-01-09 14:48:14 UTC
verified. 
both vms are created and started successfully and have payloads.

Comment 18 Itamar Heim 2013-06-11 08:32:38 UTC
3.2 has been released

Comment 19 Itamar Heim 2013-06-11 08:32:43 UTC
3.2 has been released

Comment 20 Itamar Heim 2013-06-11 08:33:42 UTC
3.2 has been released

Comment 21 Itamar Heim 2013-06-11 08:42:13 UTC
3.2 has been released