Bug 875623 - Cannot run VM that was created and updated with Payload via REST API
Cannot run VM that was created and updated with Payload via REST API
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
Unspecified Unspecified
high Severity high
: ---
: 3.2.0
Assigned To: Shahar Havivi
Tareq Alayan
: ZStream
: 875720 (view as bug list)
Depends On:
Blocks: 883444 915537
  Show dependency treegraph
Reported: 2012-11-12 03:36 EST by Tareq Alayan
Modified: 2015-09-22 09 EDT (History)
13 users (show)

See Also:
Fixed In Version: sf1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 883444 (view as bug list)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
XMLs for RESTAPI (13.16 KB, text/plain)
2012-11-12 03:37 EST, Tareq Alayan
no flags Details
engine.log (5.42 MB, text/x-log)
2012-11-12 03:40 EST, Tareq Alayan
no flags Details
old yesterday vdsm (727.12 KB, application/x-gzip)
2012-11-19 05:36 EST, Tareq Alayan
no flags Details
vdsm-today (303.61 KB, application/x-gzip)
2012-11-19 05:36 EST, Tareq Alayan
no flags Details

  None (edit)
Description Tareq Alayan 2012-11-12 03:36:16 EST
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 03:37:02 EST
Created attachment 643309 [details]
Comment 2 Tareq Alayan 2012-11-12 03:40:00 EST
Created attachment 643310 [details]
Comment 5 Shahar Havivi 2012-11-18 02:56:46 EST
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 03:00:50 EST
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)
Comment 7 Tareq Alayan 2012-11-18 17:37:49 EST
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-/ [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-/ [157b767b] FINISH, CreateVDSCommand, log id: 21e37449
2012-11-19 00:26:57,459 ERROR [org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand] (ajp-/ [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-/ [157b767b] FINISH, CreateVmVDSCommand, return: Down, log id: 7f91f1c9
2012-11-19 00:26:57,459 ERROR [org.ovirt.engine.core.bll.RunVmOnceCommand] (ajp-/ [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-/ [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-/ Operation Failed: [Network error during communication with the Host.]
2012-11-19 00:26:57,536 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (ajp-/ [fd66c3] Running command: LogoutUserCommand internal: false.
Comment 8 Shahar Havivi 2012-11-19 04:31:24 EST
(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 05:30:44 EST
yes, i can create 2 vms with no update and run them. 

logs attached;
Comment 10 Tareq Alayan 2012-11-19 05:36:12 EST
Created attachment 647673 [details]
old yesterday vdsm
Comment 11 Tareq Alayan 2012-11-19 05:36:49 EST
Created attachment 647674 [details]
Comment 12 Shahar Havivi 2012-11-19 09:36:57 EST
posted at: http://gerrit.ovirt.org/#/c/9327/
Comment 13 Shahar Havivi 2012-11-20 09:20:08 EST
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 08:38:28 EST
*** Bug 875720 has been marked as a duplicate of this bug. ***
Comment 17 Tareq Alayan 2013-01-09 09:48:14 EST
both vms are created and started successfully and have payloads.
Comment 18 Itamar Heim 2013-06-11 04:32:38 EDT
3.2 has been released
Comment 19 Itamar Heim 2013-06-11 04:32:43 EDT
3.2 has been released
Comment 20 Itamar Heim 2013-06-11 04:33:42 EDT
3.2 has been released
Comment 21 Itamar Heim 2013-06-11 04:42:13 EDT
3.2 has been released

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