Feature #22213
openSet correct primary interface for hosts created from facts
Description
This is actually an issue with how Facter decides which interface is primary. (alphabetical order..)
(see: https://tickets.puppetlabs.com/browse/FACT-380)
Foreman displays the primary IP of a host based on the primary ipaddress fact.
This is confusing when you have interfaces that come before the legacy ethX names or biosdevnames (em, en, etc)
Examples of such interfaces: default docker bridge (docker0), default bond/bridge names (bond0, brX, etc)
There are a couple 'workarounds' for this issue:
- custom fact that parses the default route.
- override fact with environment variables on the host
I would obviously like to see foreman to select the correct IP address.
A possible resolution could be to add the ability for an admin to select which interface should be marked as primary by matching against interface identifiers when importing the facts. Puppet 4 also has networking.primary fact that is set to correct value for hosts provisioned from Foreman, it could be worth investigating what it contains in different workflows.