Bug 2119911

Summary: VMware Image based Provisioning fails with error- : Could not find virtual machine network interface matching <IP>
Product: Red Hat Satellite Reporter: Satyajit Das <sadas>
Component: Compute Resources - VMWareAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: addubey
Severity: high Docs Contact:
Priority: high    
Version: 6.10.7CC: addubey, aganbat, ahumbe, ajambhul, bvassova, chrobert, jyejare, lstejska, mhulan, momran, pcreech, rlavi, saydas, shwsingh, wclark
Target Milestone: 6.13.0Keywords: PrioBumpGSS, Regression, Triaged, WorkAround
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fog-vsphere-3.5.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2174994 (view as bug list) Environment:
Last Closed: 2023-05-03 13:21:36 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:
Attachments:
Description Flags
Hotfix RPM for Satellite 6.11.4 on RHEL7
none
Hotfix RPM for Satellite 6.11.4 (RHEL8) or 6.12.2 none

Description Satyajit Das 2022-08-19 22:14:41 UTC
Description of problem:

VMware Image-based Provisioning fails with error-: Could not find virtual machine network interface matching <IP>

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

Satellite 6.10.7
tfm-rubygem-fog-vsphere.noarch 0:3.5.1-1.el7sat

How reproducible:

100% (Customer's env)


Steps to Reproduce:
1. Deploy a fresh satellite (Version: 6.10.7)
2. Add VMware as compute resource and associate an image to the compute resource().
3. Try to deploy the host using the same image (Provisioning method:cloud-init and userdata templates).

Actual results:

Image-based build fails with errors :
-----------------

==> /var/log/foreman/production.log <==
2022-08-19T13:59:21 [D|app|27d12fed] Processing task 'Query instance details for client.example.com' from 'Host::Managed Main'
2022-08-19T13:59:21 [D|app|27d12fed] Orchestration::Compute: Trying to match network interfaces from fog   <Fog::Vsphere::Compute::Interfaces
 27d12fed |     server_id="50269259-a089-3b27-7bbe-9e4af4e03684"
 27d12fed |     [
 27d12fed |                   <Fog::Vsphere::Compute::Interface
 27d12fed |         mac="00:50:56:a6:aa:8e",
 27d12fed |         network="dvportgroup-3567",
 27d12fed |         name="Network adapter 1",
 27d12fed |         status="untried",
 27d12fed |         connected=false,
 27d12fed |         summary="DVSwitch: e7 e5 0c 50 5f a1 2d e0-cb 19 92 a2 c2 b4 c8 28",
 27d12fed |         type=RbVmomi::VIM::VirtualVmxnet3,
 27d12fed |         key=4000,
 27d12fed |         virtualswitch=nil,
 27d12fed |         server_id="50269259-a089-3b27-7bbe-9e4af4e03684"
 27d12fed |       >
 27d12fed |     ]
 27d12fed |   >
2022-08-19T13:59:22 [W|app|27d12fed] Orchestration::Compute: Could not match network interface #<Nic::Managed id: nil, mac: nil, ip: "xx.xx.xx.xx", type: "Nic::Managed", name: "client.example.com", host_id: nil, subnet_id: 1, domain_id: 1, attrs: {}, created_at: nil, updated_at: nil, provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: "", tag: "", attached_to: "", managed: true, mode: "balance-rr", attached_devices: "", bond_options: "", primary: true, provision: true, compute_attributes: {"type"=>"VirtualVmxnet3", "network"=>"dvportgroup-789"}, execution: true, ip6: "", subnet6_id: nil>
2022-08-19T13:59:22 [W|app|27d12fed] Could not find virtual machine network interface matching "xx.xx.xx.xx"
-----------------

Expected results:

Build system without issues

Additional info:

Comment 5 Chris Roberts 2022-08-24 18:09:03 UTC
Sayan,

Is this customer using vCenter 6.7 or 7.0?

Comment 6 Satyajit Das 2022-08-24 18:19:51 UTC
(In reply to Chris Roberts from comment #5)
> Sayan,
> 
> Is this customer using vCenter 6.7 or 7.0?

The customer is using 6.7.

Comment 14 Ron Lavi 2022-09-28 12:07:15 UTC
Chris, Marek, do you think we should revert https://github.com/fog/fog-vsphere/commit/9b88e63b8eef2ba9a4fcad49c1df9027cef52624 ?
it seems like the issue occurred in fog-vsphere v3.5.1,
or maybe you can identify the line that broke it?

Comment 15 Jitendra Yejare 2022-09-28 12:48:10 UTC
Adding qe_test_coverage flag as its raised in SD-QE Cadence to triage if we could add this in automation.

What SD said:
```
A fare amount of users have reported this issue and for all of them downgrading the version of tfm-rubygem-fog-vsphere helped to fix the issue. 
```

Comment 16 Chris Roberts 2022-11-17 14:57:59 UTC
Ron,

that's also affecting the issue leos is working on, so my thoughts are revert the commit get a new version out so it fixes the 2 bugs for customers that are regression, then make a new redmine for these 2 issues

Comment 27 Chris Roberts 2023-02-21 15:47:27 UTC
I heard from one customer that the patch fixed their issue.

Made an updated version of fog-vsphere here:

https://rubygems.org/gems/fog-vsphere/versions/3.5.3

Moving the BZ to POST so the delivery team can bring the new version of the gem in, also added it to the fixed in version.

- Chris Roberts

Comment 28 wclark 2023-02-28 20:24:50 UTC
Created attachment 1947040 [details]
Hotfix RPM for Satellite 6.11.4 on RHEL7

INSTALL INSTRUCTIONS:

1. Take a complete backup or snapshot of Satellite 6.11.4 server

2. Download the hotfix RPM matching your Satellite and RHEL version and copy it to the affected Satellite server

3. # yum install ./tfm-rubygem-fog-vsphere-3.5.2-3.HOTFIXRHBZ2119911.el7sat.noarch.rpm --disableplugin=foreman-protector

4. # systemctl restart foreman.service

Comment 29 wclark 2023-02-28 20:29:43 UTC
Created attachment 1947042 [details]
Hotfix RPM for Satellite 6.11.4 (RHEL8) or 6.12.2

INSTALL INSTRUCTIONS:

1. Take a complete backup or snapshot of Satellite server

2. Download the hotfix RPM matching your Satellite and RHEL version and copy it to the affected Satellite server

3. # dnf install ./rubygem-fog-vsphere-3.5.2-3.HOTFIXRHBZ2119911.el8sat.noarch.rpm --disableplugin=foreman-protector

4. # systemctl restart foreman.service

NOTE: This hotfix works with Satellite version 6.11 or 6.12, running on RHEL8

Comment 33 errata-xmlrpc 2023-05-03 13:21:36 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 (Important: Satellite 6.13 Release), 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-2023:2097