Bug 1353720

Summary: Can not provision because network vlan is not available when RHEVM 4 is a provider on CFME 5.6
Product: Red Hat CloudForms Management Engine Reporter: Alex Krzos <akrzos>
Component: ProvisioningAssignee: Moti Asayag <masayag>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: akrzos, gblomqui, istein, jhardy, juan.hernandez, lkerner, obarenbo, oourfali
Target Milestone: GAFlags: akrzos: needinfo-
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rhev
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-04 12:57:01 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:
Embargoed:
Bug Depends On: 1352967    
Bug Blocks:    
Attachments:
Description Flags
evm.log during provisioning on rhevm 4.0 none

Description Alex Krzos 2016-07-07 19:57:33 UTC
Created attachment 1177439 [details]
evm.log during provisioning on rhevm 4.0

Description of problem:
I am attempting to run through a provisioning workload with RHEVM 4.0 as a provider.  I placed templates on my provider and can create VMs of CFME or whatever I desire, however when I attempt to initiate a provisioning request from CFME to provision a VM on RHEVM I encounter a stacktrace in evm.log

Version-Release number of selected component (if applicable):
CFME 5.6.0.13
RHEVM 4.0.0.6-0.1.el7ev

How reproducible:
Always with this environment and builds

Steps to Reproduce:
1. Send an api request to provision a VM on RHEVM via the REST API
2. Tail evm.log or open Web UI and view error
3.

Actual results:
Attached in the evm.log of the attempted provision

in the Web UI you will see "[Ovirt::MissingResourceError]: Ovirt::MissingResourceError" for the request under services->requests

Expected results:
A vm to be provisioned

Additional info:
When attempting to manually provision a vm through the Web UI for CFME, the networking tab shows no resources but should show "ovirtmgmt".  Perhaps this was not correctly inventoried.  Also there is a stack trace related to the error in the evm.log.  Attached is an evm.log when two provisioning requests were sent via REST API to the appliance.

Comment 2 Moti Asayag 2016-07-11 12:58:59 UTC
The log indicates that the URLs to/from ovirt-engine aren't constructed well on CFME side:

[----] E, [2016-07-07T15:50:34.444770 #62687:10ce238] ERROR -- : <RHEVM> Ovirt::Service#parse_error_response Return from URL: <https://10.12.20.179/ovirt-engine/api/ovirt-engine/api/vms/7e3a771c-c73b-4620-a0f2-2e0b681030df/disks> Data:

As PR [1] suggested, this should be fixed as part of fixing bug 1352967.

[1] https://github.com/ManageIQ/ovirt/pull/55

Comment 3 Moti Asayag 2016-07-17 17:21:11 UTC
Could you try to remove the ovirt-engine-4.0 provider and clear all of its related entities from manageIQ (make sure that VMS tables doesn't contain any vm) - that will assure that no leftovers of VMS entries which include ovirt-engine/api/ovirt-engine/api in the 'href' field of the VMS table.

Than add the ovirt-engine-4.0 provider again and repeat the test.

This error is already solved in ovirt.gem and shouldn't appear.

Comment 4 Oved Ourfali 2016-07-28 13:16:14 UTC
Overall it seems to have been fixed already by the RHV4 compatibility fixes.
Moving to MODIFIED.

Comment 5 Ilanit Stein 2016-09-19 12:28:00 UTC
Verified on CFME-5.7.0.1.20160913164703_66caf07,
that was added manually the fix of bug 1374995.

VM Provision on RHV-4.0.4.2-0.1 PASS. 
VM is created, and started successfully by CFME.

Comment 6 Ilanit Stein 2016-09-19 12:45:21 UTC
Verified also on CFME-5.6.2.0.20160913114355_70e9086,
that was added manually the fix of bug 1374995.

VM Provision on RHV-4.0.4.2-0.1 PASS. 
VM is created, and started successfully by CFME.

Comment 7 Oved Ourfali 2016-10-27 14:31:20 UTC
*** Bug 1389216 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2017-01-04 12:57:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0012.html