Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1616356

Summary: With fog-vsphere 2.3 trying to provision to a port group within a distributed switch fails
Product: Red Hat Satellite Reporter: Chris Roberts <chrobert>
Component: Compute Resources - VMWareAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: Perry Gagne <pgagne>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: chrobert, mhulan, vgunasek, zhunting
Target Milestone: 6.4.0Keywords: Regression, Triaged, UserExperience
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: https://projects.theforeman.org/issues/24571
Whiteboard:
Fixed In Version: foreman-1.18.0.10-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:33:33 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:    
Bug Blocks: 1607539    

Description Chris Roberts 2018-08-15 17:01:04 UTC
Description of problem:
With the latest fog-vsphere pr to speed up the networking, there seems to be some regression with port groups on a dswitch. When trying to prov to one of these, Foreman throws a ui error saying it cant find a network name with #{ip} and does not log anything in the production log. Using fog-vsphere 2.1

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

fog-vsphere 2.3.0
foreman 1.18
katello 3.7


How reproducible:


Steps to Reproduce:
1. Install 6.4 and connect to vmware compute resource
2. try to provision to port group connected to dswitch

Actual results:
cant find a network name with #{ip}

Expected results:
It works correctly

Additional info:

PR that has caused the regression:

Comment 1 Chris Roberts 2018-08-15 17:07:36 UTC
*Nightly where broken:*

*Host on Dswitch:*

<pre><code class="ruby">
Parameters: {"utf8"=>"✓", "authenticity_token"=>"PbK6/UYfOrEay/jYyB33J9wjhy3WK8coQs2nS8tKPt4aE9H1o77bZ50
oZd4uRJ+MU9ifObOzIc5T2XWf0CWi5g==", "host"=>{"name"=>"paula-mccaddon", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"1", "con
tent_facet_attributes"=>{"lifecycle_environment_id"=>"1", "content_view_id"=>"1", "content_source_id"=>"1"}, "managed"=>"true", "progress_re
port_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identi
fier"=>"", "name"=>"paula-mccaddon", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"10.8.106.91", "ip6"=>"", "managed"=>"1", "primary"=>"1", "pr
ovision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualVmxnet3", "network"=>"dvportgroup-1701"}
}}, "compute_attributes"=>{"cpus"=>"1", "corespersocket"=>"1", "memory_mb"=>"2048", "firmware"=>"bios", "cluster"=>"SysMgmt_vMotion", "resou
rce_pool"=>"Resources", "path"=>"/Datacenters/RH_Engineering/vm", "guest_id"=>"rhel7_64Guest", "hardware_version"=>"Default", "memoryHotAddE
nabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"0", "start"=>"1", "annotation"=>"", "scsi_controllers"=>"{\"scsiControllers\":[{\"type\
":\"VirtualLsiLogicController\",\"key\":1000}],\"volumes\":[{\"thin\":true,\"name\":\"Hard disk\",\"mode\":\"persistent\",\"controllerKey\":
1000,\"size\":10485760,\"sizeGb\":10,\"storagePod\":\"Synology-Cluster\"}]}"}, "architecture_id"=>"1", "operatingsystem_id"=>"2", "provision
_method"=>"build", "build"=>"1", "medium_id"=>"10", "ptable_id"=>"94", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]",
 "is_owned_by"=>"4-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, "media_selector"=>"install_media"}

2018-08-13T11:04:00 [W|app|167ab] Orchestration::Compute: Could not match network interface #<Nic::Managed id: nil, mac: nil, ip: "10.8.106.
91", type: "Nic::Managed", name: "paula-mccaddon.toledo.satellite.lab.eng.rdu2.redha...", 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: "", attac
hed_to: "", managed: true, mode: "balance-rr", attached_devices: "", bond_options: "", primary: true, provision: true, compute_attributes: {
"type"=>"VirtualVmxnet3", "network"=>"dvportgroup-1701"}, ip6: "", subnet6_id: nil>

2018-08-13T11:04:00 [W|app|167ab] info on nic [  <Fog::Compute::Vsphere::Interface
    mac="00:50:56:9e:6c:a6",
    network="dvportgroup-1701",
    name="Network adapter 1",
    status="untried",
    connected=false,
    summary="DVSwitch: 50 1e 9d b9 56 bb 5a 31-67 ec 58 ce 84 59 cf b6",
    type=RbVmomi::VIM::VirtualVmxnet3,
    key=4000,
    virtualswitch=nil,
    server_id="501e032b-c85c-4a65-b3cd-ee2198f62e1c"
  >]
</code></pre>

*Host on std switch:*

<pre><code class="ruby">
Parameters: {"utf8"=>"✓", "authenticity_token"=>"N43hLv5LNYB+oLe7GefZAXW1EgkHwmNrz/zmqs1Ht7oQLIomG+rUVvlDKr3/vrGq+k4KHWJahY3e6DR+1igrgg==", "host"=>{"name"=>"tom-gehrlein", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"1", "content_facet_attributes"=>{"lifecycle_environment_id"=>"1", "content_view_id"=>"1", "content_source_id"=>"1"}, "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"tom-gehrlein", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"10.8.106.143", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualVmxnet3", "network"=>"network-107"}}}, "compute_attributes"=>{"cpus"=>"1", "corespersocket"=>"1", "memory_mb"=>"2048", "firmware"=>"bios", "cluster"=>"Satellite_Engineering", "resource_pool"=>"Resources", "path"=>"/Datacenters/RH_Engineering/vm", "guest_id"=>"rhel7_64Guest", "hardware_version"=>"Default", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"0", "start"=>"1", "annotation"=>"", "scsi_controllers"=>"{\"scsiControllers\":[{\"type\":\"VirtualLsiLogicController\",\"key\":1000}],\"volumes\":[{\"thin\":true,\"name\":\"Hard disk\",\"mode\":\"persistent\",\"controllerKey\":1000,\"size\":10485760,\"sizeGb\":10,\"storagePod\":\"Synology-Cluster\"}]}"}, "architecture_id"=>"1", "operatingsystem_id"=>"2", "provision_method"=>"build", "build"=>"1", "medium_id"=>"10", "ptable_id"=>"94", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"4-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, "media_selector"=>"install_media"}
2018-08-13T11:09:18 [I|app|e575a] Current user set to admin (admin)
2018-08-13T11:09:18 [I|app|] Started GET "/notification_recipients" for 10.13.129.13 at 2018-08-13 11:09:18 -0400
2018-08-13T11:09:18 [I|app|20aa5] Processing by NotificationRecipientsController#index as JSON
2018-08-13T11:09:18 [I|app|20aa5] Current user set to admin (admin)
2018-08-13T11:09:18 [I|app|20aa5] Completed 200 OK in 17ms (Views: 0.2ms | ActiveRecord: 2.2ms)
2018-08-13T11:09:19 [I|app|e575a] Adding Compute instance for tom-gehrlein.toledo.satellite.lab.eng.rdu2.redhat.com


==> /var/log/foreman/production.log <==
2018-08-13T11:09:21 [W|app|e575a] nic info [  <Fog::Compute::Vsphere::Interface
    mac="00:50:56:9e:7f:d8",
    network="Toledo_Vlan_207",
    name="Network adapter 1",
    status="untried",
    connected=false,
    summary="Toledo_Vlan_207",
    type=RbVmomi::VIM::VirtualVmxnet3,
    key=4000,
    virtualswitch=nil,
    server_id="501e83c1-77b1-869e-dbc3-e98096072706"
  >]
</code></pre>

*Foreman1.15 with non updated network listing:*

<pre><code class="ruby">
Wr6vm07jOKsg/rhG/uBMXD8EKrKXgi0hTB4g==", "host"=>{"name"=>"chris-mendia", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"1", "compute_resource_id"=>"1", "content_facet_attributes"=>{"lifecycle_environment_id"=>"1", "content_view_id"=>"2", "content_source_id"=>"1", "kickstart_repository_id"=>"18"}, "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"chris-mendia", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"10.8.105.47", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualVmxnet3", "network"=>"dvportgroup-1701"}}}, "compute_attributes"=>{"cpus"=>"1", "corespersocket"=>"1", "memory_mb"=>"2048", "firmware"=>"bios", "cluster"=>"SysMgmt_vMotion", "resource_pool"=>"Resources", "path"=>"/Datacenters/RH_Engineering/vm/Satellite-Engineering", "guest_id"=>"rhel7_64Guest", "scsi_controller_type"=>"VirtualLsiLogicController", "hardware_version"=>"Default", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"0", "start"=>"1", "annotation"=>"", "volumes_attributes"=>{"0"=>{"_delete"=>"", "storage_pod"=>"Synology-Cluster", "name"=>"Hard disk", "size_gb"=>"20", "thin"=>"true", "eager_zero"=>"false", "mode"=>"persistent"}}}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "provision_method"=>"build", "build"=>"1", "ptable_id"=>"92", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build image new_volume bootdisk", "provider"=>"Vmware", "media_selector"=>"synced_content", "bare_metal_capabilities"=>"build"}


2018-08-13 11:27:47 013becb2 [app] [E] VMW: vm interfaces [  <Fog::Compute::Vsphere::Interface
 |     mac=nil,
 |     network="VLAN-Test",
 |     name="Network adapter",
 |     status=nil,
 |     summary="VM Network",
 |     type=RbVmomi::VIM::VirtualVmxnet3,
 |     key=nil,
 |     virtualswitch=nil,
 |     server_id=nil
 |   >]
</code></pre>

Comment 6 Chris Roberts 2018-09-18 14:03:58 UTC
*** Bug 1629962 has been marked as a duplicate of this bug. ***

Comment 7 Bryan Kearney 2018-10-16 19:33:33 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-2018:2927