Bug 1572917 - vm.hardware.nics[0].lan nil for RHV VMs
Summary: vm.hardware.nics[0].lan nil for RHV VMs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Alona Kaplan
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks: 1588042
TreeView+ depends on / blocked
 
Reported: 2018-04-28 17:57 UTC by Ian Tewksbury
Modified: 2020-06-16 06:12 UTC (History)
10 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1588042 (view as bug list)
Environment:
Last Closed: 2019-02-11 14:00:02 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ManageIQ manageiq-providers-ovirt pull 238 0 None closed vm.hardware.nics[i].lan should return the network attached to the vm 2020-06-16 06:10:24 UTC
Github ManageIQ manageiq-providers-ovirt pull 260 0 None closed Fix travis network id nil 2020-06-16 06:10:24 UTC

Description Ian Tewksbury 2018-04-28 17:57:55 UTC
Description of problem:
For a given MiqAeServiceManageIQ_Providers_Redhat_InfraManager_Vm object the `#hardware.nics[0].lan` is nil. But for a MiqAeServiceManageIQ_Providers_Vmware_InfraManager_Vm the same call returns the lan.

Additionally if I get the lan object for a given RHV host and ask it for all VMs the list comes back empty.

It seems the mapping of LANs to VMs is not happing for RHV providers but is happening for VMware.


Version-Release number of selected component (if applicable):
CFME: 5.8.2.3.20171016155816_aaec796
RHV-M: 4.0.7.5-0.1.el7ev

RHV Host:
* OS Version: RHEL - 7.4 - 18.el7
* OS Description: Cloud Suite
* Kernel Version: 3.10.0 - 693.17.1.el7.x86_64
* KVM Version: 2.9.0 - 16.el7_4.13
* LIBVIRT Version: libvirt-3.2.0-14.el7_4.7
* VDSM Version: vdsm-4.19.45-1.el7ev
* SPICE Version: 0.12.8 - 2.el7.1
* GlusterFS Version: [N/A]
* CEPH Version: librbd1-0.94.5-2.el7


How reproducible:
All RHV VMs.


Steps to Reproduce:
1. Get a MiqAeServiceManageIQ_Providers_Redhat_InfraManager_Vm object 
2. vm.hardware.nics[0].lan

Actual results:
returns nil


Expected results:
the associated LAN object

Comment 2 Greg McCullough 2018-04-29 19:23:46 UTC
Automate is only exposing the associations that are mapped and populated by the provider.  If the data is not collected and populated by the provider will not be available through Automate.

Passing to the Providers team to review.

Comment 4 Alona Kaplan 2018-05-10 12:12:58 UTC
Is it a regression?

Comment 5 Ian Tewksbury 2018-05-10 13:10:49 UTC
Alona,

I do not know. This is the first time I have tried doing this.

Blue skies,
Ian

Comment 7 Ilanit Stein 2018-06-06 06:32:33 UTC
Ian,

Can you please elaborate on the verification steps required here?
(What is exactly needed to be run on automate)

Thanks,
Ilanit.

Comment 8 Ian Tewksbury 2018-06-06 11:20:34 UTC
@llanit,

This should do the trick in the rails console:

```
vm = $evm.vmdb(:vm).find_by_name("my_vm_host_name")
vm.hardware.nics[0].lan
```

currently for RHV that returns `nil` but it should return a lan object as it does for VMWare.

Comment 10 CFME Bot 2018-06-07 05:43:49 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:

https://github.com/ManageIQ/manageiq-providers-ovirt/commit/4df9bfc7db548d3316fbe4875c665926aa33f5e9
commit 4df9bfc7db548d3316fbe4875c665926aa33f5e9
Author:     Alona Kaplan <alkaplan>
AuthorDate: Wed Jun  6 12:49:15 2018 -0400
Commit:     Alona Kaplan <alkaplan>
CommitDate: Wed Jun  6 12:49:15 2018 -0400

    Fix travis failure in case the network_id is nil

    Fixes https://bugzilla.redhat.com/1572917

 app/models/manageiq/providers/redhat/inventory/parser/infra_manager.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 11 Radim Hrazdil 2018-09-18 10:27:32 UTC
Verified:

```
$evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
vm = $evm.vmdb(:vm).find_by_name('test_vm')
vm.hardware.nics[0].lan
```
Outputs:
=> #<MiqAeServiceLan:0x4e4c344 @object=#<Lan id: 1, switch_id: 1, name: "ovirtmgmt", tag: nil, created_on: "2018-09-17 11:38:16", updated_on: "2018-09-17 11:38:16", uid_ems: "03de76c3-77e5-4185-be38-da1fd7174d0e", allow_promiscuous: nil, forged_transmits: nil, mac_changes: nil, computed_allow_promiscuous: nil, computed_forged_transmits: nil, computed_mac_changes: nil, parent_id: nil, ems_ref: nil>, @virtual_columns=["href_slug", "region_description", "region_number"], @associations=["guest_devices", "hosts", "switch", "templates", "vms"]>

Version CFME 5.10.0.15.20180914163601_fb02d7e
Version RHV: 4.2.6.3-0.1.el7ev


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