Project

General

Profile

Bug #11990

app/services/fact_parser.rb does not return all the virtual interfaces

Added by Julien Pivotto almost 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

This looks like a bug:

While taking a look into the foreman code, I saw that snippet in app/services/fact_parser.rb

  def find_physical_interface(interfaces)
    interfaces.detect { |int, _| int.to_s !~ FactParser::VIRTUAL_NAMES }
  end

  def find_virtual_interface(interfaces)
    interfaces.detect { |int, _| int.to_s =~ /#{FactParser::BONDS}/ }
  end

I think this should be

  def find_physical_interface(interfaces)
    interfaces.detect { |int, _| int.to_s !~ FactParser::VIRTUAL_NAMES }
  end

  def find_virtual_interface(interfaces)
    interfaces.detect { |int, _| int.to_s =~ FactParser::VIRTUAL_NAMES }
  end

Associated revisions

Revision 39912bb3 (diff)
Added by Julien Pivotto almost 4 years ago

fixes #11990 - improve virtual interfaces discovery in fact parser

History

#1 Updated by Julien Pivotto almost 4 years ago

  • Description updated (diff)

#2 Updated by The Foreman Bot almost 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2765 added
  • Pull request deleted ()

#3 Updated by Anonymous almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Dominic Cleal almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 63

Also available in: Atom PDF