Bug 1374231 - Unable to run VM with faked vdsm
Summary: Unable to run VM with faked vdsm
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: vdsm-jsonrpc-java
Classification: oVirt
Component: Core
Version: 1.2.5
Hardware: Unspecified
OS: Unspecified
high
medium vote
Target Milestone: ---
: ---
Assignee: Ravi Nori
QA Contact: Jiri Belka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-08 09:54 UTC by Eli Mesika
Modified: 2016-12-05 19:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-05 19:20:19 UTC
oVirt Team: Infra
rule-engine: planning_ack?
rule-engine: devel_ack?
lsvaty: testing_ack+


Attachments (Terms of Use)
Engine Log (1.49 MB, text/plain)
2016-09-08 09:55 UTC, Eli Mesika
no flags Details

Description Eli Mesika 2016-09-08 09:54:31 UTC
Description of problem:
When creating a VM with a bootable disk and a nic using faked-vdsm and trying to run it engine fails with an exception 
The reason is that a non-provisioned UUID which not exists in the database is returned by VDSM to the engine and that leads to NPE 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.setup and run faked-vdsm 
2.Create DC + Cluster + Host + Storage 
3.Create a VM with bootable disk and one Nic
4.Run the VM 

Actual results:


Expected results:


Additional info:

See engine.log 

Exception is in 2016-09-06 17:06:41,455
The real VM UUID in DB is 6bc4e2bf-a8c8-4a74-b73d-55141e0f1f10 , the one passed to VdsManager is 89a9e0ca-21aa-4e8d-9271-1e2d972d39b5

Comment 1 Eli Mesika 2016-09-08 09:55:46 UTC
Created attachment 1198973 [details]
Engine Log

Comment 2 Oved Ourfali 2016-09-13 12:13:09 UTC
Eli - were you able to fix that?
I heard the env is running properly.
Anyway, putting on Ravi if a jsonrpc patch is required.

Comment 3 Eli Mesika 2016-09-15 13:43:04 UTC
Yes , Juan provides a workaround for that :

workaround:

diff --git a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResource.java b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResource.java
index 1df62b9..90f4d5a 100644
--- a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResource.java
+++ b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResource.java
@@ -90,7 +90,7 @@ public class BackendStorageDomainsResource
                             entity.getStorageType(),
                             entity.getStorageDomainType(),
                             connection);
-            if (existing != null) {
+            if (existing != null  && !Guid.isNullOrEmpty(existing.getId()))

Comment 4 Oved Ourfali 2016-10-10 05:13:10 UTC
Is it something to push to gerrit?

Comment 5 Eli Mesika 2016-10-10 09:25:55 UTC
(In reply to Oved Ourfali from comment #4)
> Is it something to push to gerrit?

There is an open thread on that if the fix should be on the API side or (more likely) on the faked-vdsm side.

Martin, can we have a discussion/decision on that?

Comment 6 Martin Perina 2016-10-25 13:30:44 UTC
Personally I'd rather fix fakevdsm to behave the same way as VDSM (if possible).


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