Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1612921 - Getting error "Oops, we're sorry but something went wrong undefined method `port' for #<RbVmomi::VIM::VirtualEthernetCardLegacyNetworkBackingInfo:0x00007f61dd1f2750>" while associating VMs to compute resource
Summary: Getting error "Oops, we're sorry but something went wrong undefined method `p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - VMWare
Version: 6.3.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: 6.5.0
Assignee: Chris Roberts
QA Contact: Sanket Jagtap
URL: https://github.com/fog/fog-vsphere/pu...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-06 14:20 UTC by Gauravi
Modified: 2022-03-13 15:21 UTC (History)
6 users (show)

Fixed In Version: fog-vsphere v2.4.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:37:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20302 0 Normal Closed vCenter compute resource associate VMs error 2020-02-05 02:56:50 UTC
Github fog fog-vsphere pull 157 0 None closed Help prevent hard fail on nil undefined legacy networks. 2020-02-05 02:56:50 UTC
Red Hat Knowledge Base (Solution) 3556411 0 None None None 2018-08-08 11:02:56 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:37:52 UTC

Description Gauravi 2018-08-06 14:20:08 UTC
Description of problem:
While attempting to associate VMs to compute resource - VMWare, it throws below error:
"Oops, we're sorry but something went wrong undefined method `port' for #<RbVmomi::VIM::VirtualEthernetCardLegacyNetworkBackingInfo:0x00007f61dd1f2750>" 

Version-Release number of selected component (if applicable):
VMware vSphere 6.0
Satellite 6.3.0

How reproducible:
Always

Steps to Reproduce:
1. Click Infrastructure > Compute resources > vCenter connection
2. Click Associate VMs
3. Error message is displayed

Actual results:
"Oops, we're sorry but something went wrong undefined method `port' for #<RbVmomi::VIM::VirtualEthernetCardLegacyNetworkBackingInfo:0x00007f61dd1f2750>" 


Expected results:
VMs should get associated to compute resource.

Additional info:
NA

Comment 5 Chris Roberts 2018-09-18 15:44:04 UTC
Works in 6.4

I used 3 vms 1 being the satellite on 1 subnet with a vmxnet3 nic. The other 2 vms were on a different subnet 1 with an e1000 nic and 1 with the vmxnet3 and all 3 got associated correctly. Marking this as working current release.

2018-09-18T11:39:53 [I|aud|2c682] update event for Host::Base with id 1
2018-09-18T11:39:53 [I|aud|2c682] update event for Host::Base with id 3
2018-09-18T11:39:53 [I|aud|2c682] update event for Host::Base with id 2

Screenshots showing hosts are associated:

http://nimb.ws/nTPldX

http://nimb.ws/5bsZVh

Comment 6 Marek Hulan 2018-09-18 17:33:45 UTC
I know Ivan was looking into this. The theory was, this was some vm created on old version of vmware - see the VirtualEthernetCardLegacyNetworkBackingInf object class. I think to ptiperly reproduce, we'd need to figure out, how to create such vm first.

Ivan, was there some fix planned to ignore/skip such interfaces, so we don't hard fail on unsupported nics? Should we reopen?

Comment 7 Marek Hulan 2018-09-18 18:20:28 UTC
After quick chat with Ivan, I'm reopening. The solution should be some "rescue" call, so we ignore the problematic interface but don't fail hard. We have the trace, so it should be easy patch to fog-vsphere.

Comment 9 Marek Hulan 2018-09-26 11:28:53 UTC
This fix should be trivial and belongs here https://github.com/fog/fog-vsphere/blob/master/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb#L68

It would be good to test how it behaves when you manually enforce network to be nil, if you don't have reproducer.

Comment 11 Satellite Program 2018-10-23 10:02:01 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/20302 has been resolved.

Comment 14 Sanket Jagtap 2018-12-31 13:14:58 UTC
Build: Satellite 6.5 snap9


Was able to associate the VM to Vmware resource successfully.

Production Log:
2018-12-31T08:12:14 [I|app|] Started PUT "/compute_resources/2-vmware/associate?compute_resource_id=2-vmware" for 0.67.116.48 at 2018-12-31 08:12:14 -0500
2018-12-31T08:12:14 [I|app|b8f60] Processing by ComputeResourcesController#associate as HTML
2018-12-31T08:12:14 [I|app|b8f60]   Parameters: {"authenticity_token"=>"0r9s88XX+I8OCCtCnckDVB+tMMIXr59E7SACH9Txec1ld9yJSlRhce4EgCf260VbSqM6lhjsd+uX2GgLSFDDtw==", "compute_resource_id"=>"2-vmware", "id"=>"2-vmware"}
2018-12-31T08:12:14 [I|app|b8f60] Current user set to admin (admin)
2018-12-31T08:12:14 [D|app|b8f60] Current location set to none
2018-12-31T08:12:14 [D|app|b8f60] Current organization set to Default Organization
2018-12-31T08:12:28 [I|aud|b8f60] Host::Base (19) update event on uuid , 501e5762-d2af-67b3-12f7-b9337b540f2
2018-12-31T08:12:28 [I|aud|b8f60] Host::Base (19) update event on compute_resource_id , 2
2018-12-31T08:12:29 [I|app|b8f60] Redirected to https://qe-sat6-feature-rhel7.domain/compute_resources/2-vmware
2018-12-31T08:12:29 [I|app|b8f60] Completed 302 Found in 14551ms (ActiveRecord: 322.7ms)
2018-12-31T08:12:29 [I|app|] Started GET "/compute_resources/2-vmware" for 0.67.116.48 at 2018-12-31 08:12:29 -0500
2018-12-31T08:12:29 [I|app|26d30] Processing by ComputeResourcesController#show as HTML
2018-12-31T08:12:29 [I|app|26d30]   Parameters: {"id"=>"2-vmware"}
2018-12-31T08:12:29 [I|app|26d30] Current user set to admin (admin)
2018-12-31T08:12:29 [D|app|26d30] Current location set to none
2018-12-31T08:12:29 [D|app|26d30] Current organization set to Default Organization
2018-12-31T08:12:29 [D|app|26d30] Deface: 2 overrides found for 'compute_resources/show'
2018-12-31T08:12:29 [D|app|26d30] Deface: 'rename_virtual_machines_containers' matched 1 times with 'erb[loud]:contains('Virtual Machines')'
2018-12-31T08:12:29 [I|app|26d30] Deface: [WARNING] No :original defined for 'rename_virtual_machines_containers', you should change its definition to include:
 :original => 'adff190a5a6ab59b88f6cf9956f23cd53db53248' 
2018-12-31T08:12:29 [D|app|26d30] Deface: 'remove_compute_profiles_tab' matched 1 times with 'a[href="#compute_profiles"]'
2018-12-31T08:12:29 [I|app|26d30] Deface: [WARNING] No :original defined for 'remove_compute_profiles_tab', you should change its definition to include:
 :original => 'aecbf94e43770bf29957263a987790f7873c4fd6' 
2018-12-31T08:12:29 [I|app|26d30]   Rendering compute_resources/show.html.erb within layouts/application
2018-12-31T08:12:29 [I|app|26d30]   Rendered compute_resources/show/_vmware.html.erb (1.4ms)
2018-12-31T08:12:29 [I|app|26d30]   Rendered compute_resources/show.html.erb within layouts/application (22.0ms)
2018-12-31T08:12:29 [I|app|26d30]   Rendered layouts/_application_content.html.erb (1.9ms)
2018-12-31T08:12:29 [I|app|26d30]   Rendering layouts/base.html.erb
2018-12-31T08:12:29 [I|app|26d30]   Rendered layouts/base.html.erb (38.7ms)
2018-12-31T08:12:29 [I|app|26d30] Completed 200 OK in 04ms (Views: 58.5ms | ActiveRecord: 12.8ms)
2018-12-31T08:12:32 [I|app|] Started GET "/notification_recipients" for 0.67.116.48 at 2018-12-31 08:12:32 -0500
2018-12-31T08:12:32 [I|app|4176c] Processing by NotificationRecipientsController#index as JSON
2018-12-31T08:12:32 [I|app|4176c] Current user set to admin (admin)
2018-12-31T08:12:32 [D|app|4176c] Current location set to none
2018-12-31T08:12:32 [D|app|4176c] Current organization set to Default Organization
2018-12-31T08:12:32 [D|not|4176c] Cache Hit: notification, reading cache for notification-4

Comment 17 errata-xmlrpc 2019-05-14 12:37:41 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://access.redhat.com/errata/RHSA-2019:1222


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