Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-21131

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

XMLWordPrintable

    • Moderate
    • To Do
    • None

      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.

              jira-bugzilla-migration RH Bugzilla Integration
              rhn-support-jalviso Josephine Alviso
              RH Bugzilla Integration RH Bugzilla Integration
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: