Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-2946

VLAN interfaces not properly discovered

    XMLWordPrintable

    Details

    • Template:
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2021-03-31, NW - 2021-04-14
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      VLAN interfaces with dot in their name (on operating systems such as FreeBSD) were not being correctly displayed by Facter 4 in the networking fact. This fix allows the default networking resolver to recognize interfaces with dot in their name.
    • QA Risk Assessment:
      Needs Assessment

      Description

      In FreeBSD, it's standard practice to specify VLAN interfaces with a period separating the interface and VLAN.  (e.g.  igb1.5 specifies the igb1 network interface VLAN 5).

      However, Facter 4 is not picking these up as interfaces, and is instead assigning these attributes to the lo0 interface.

      In lib/facter/resolvers/networking.rb

      interfaces_data = Hash[*response.split(/^([A-Za-z0-9_]+): /)[1..-1]]
      

       
      adding a literal period "\." to the regex allows these interfaces to be properly identified.

      interfaces_data = Hash[*response.split(/^([A-Za-z0-9_\.]+): /)[1..-1]]
      

        Attachments

          Activity

            People

            Assignee:
            luchian.nemes Luchian Nemes
            Reporter:
            ryanbethke Ryan Bethke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support