Bug 2075717

Summary: Snippet 'kickstart_ifcfg_generic_interface' creates 2 sets of interface (ifcfg-vlan1 and ifcfg-vlan1-1) when provisioning a host with VLAN tagged interface over bond device
Product: Red Hat Satellite Reporter: jalviso <jalviso>
Component: Provisioning TemplatesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED MIGRATED QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: lstejska, mhulan, sganar
Target Milestone: UnspecifiedKeywords: MigratedToJIRA, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-06 12:21:09 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:

Description jalviso 2022-04-14 23:15:34 UTC
Description of problem:

With the fix in Bug 1956494, it is possible to provision host with VLAN tagged interface over bond device.
However, with the "kickstart_ifcfg_generic_interface" snippet that sets the "TYPE" parameter in the network interface script to "bonding":

    Lines 62-64 in the snippet on the Foreman Github:
    https://github.com/theforeman/community-templates/blob/develop/provisioning_templates/snippet/kickstart_ifcfg_generic_interface.erb


   <%-     if @bonding_interfaces.include?(@interface.attached_to) -%>
   <%=       "TYPE=bonding" %>
   <%-     end -%>


it creates 2 interfaces; ifcfg-vlan1 with TYPE "bonding" and another ifcfg-vlan1-1 with TYPE "Vlan"

Version-Release number of selected component (if applicable): 6.8+ and above

How reproducible: Always

Steps to Reproduce:
1. Build a new physical Dell R630 server with RHEL 8.5 using the Satellite full host boot disk image with below Host network configuration:

   bond0: LACP bond enslaving em1 and em2
   em1: Bond slave - bond0
   em2: Bond slave - bond0
   bond1: LACP bond enslaving em3 and em4
   em3: Bond slave - bond1
   em4: Bond slave - bond1
   ib0:  InfiniBand - MAC 
   vlan321: Provisioning Interface in vlan 321, attached to bond1

2. A preview of the "Kickstart default" template for host (with tagged vlan over bond device):

  There was an error rendering the Kickstart default template: ERF42-7327 [Foreman::Exception]: The snippet 'kickstart_ifcfg_generic_interface' threw an error: undefined method '#include?' for NilClass::Jail (NilClass)

Actual results:

The host provisions with 2 vlan interface:

   --- Start ifcfg-vlan321-1 file ---
VLAN=yes
TYPE=Vlan  <========================================
PHYSDEV=bond1
VLAN_ID=321
REORDER_HDR=yes
GVRP=no
MVRP=no
HWADDR=
PROXY_METHOD=none
BROWSER_ONLY=no
NM_USER_ORG__FREEDESKTOP___NETWORK_MANAGER__ORIGIN=nm-initrd-generator
BOOTPROTO=none
IPADDR=<obfuscated>
PREFIX=26
GATEWAY=<obfuscated>
DNS1=<obfuscated>
DNS2=<obfuscated>
DEFROUTE=yes
DHCP_HOSTNAME=host.example.com
DHCP_VENDOR_CLASS_IDENTIFIER=anaconda-Linux
IPV4_DHCP_TIMEOUT=90
IPV4_FAILURE_FATAL=yes
IPV6_DISABLED=yes
IPV6INIT=no
NAME=vlan321
UUID=<obfuscated>
DEVICE=vlan321
ONBOOT=yes
AUTOCONNECT_RETRIES=1
MULTI_CONNECT=1
--- End file ---

--- Start ifcfg-vlan321 file ---
BOOTPROTO="none"
IPADDR=<obfuscated>
NETMASK=<obfuscated>
GATEWAY=<obfuscated>
DOMAIN=<obfuscated>
DEVICE=vlan321
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
DNS1=<obfuscated>
DNS2=<obfuscated>
VLAN=yes
VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD
PHYSDEV=bond1
TYPE=bonding     <========================================
MTU=1500
--- End file ---

Expected results:

ifcfg-vlan321 should be the only one created with correct TYPE "Vlan"

Additional info:

The setting of TYPE=bonding was not handled by NetworkManager and hence the ifcfg-vlan321-1 interface file was created.

Comment 2 Brad Buckingham 2023-11-02 17:44:31 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 4 Brad Buckingham 2023-12-01 18:00:29 UTC
Based upon feedback during auto-closure, leaving this bugzilla open a while longer for additional investigation; however, it may be closed in a future iteration.

Comment 5 Eric Helms 2024-06-06 12:21:09 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.