Facter release notes

These are the new features, resolved issues, and deprecations in this version of Facter.

Facter 4.0.51

Released 16 February 2021 and shipped with Puppet Platform 7.4.1.

This release includes minor maintenance changes. For the latest features, see the release notes for Facter 3.14.50.

Facter 4.0.50

Released 9 February 2021 and shipped with Puppet Platform 7.4.0.

Enhancements

  • Networking fact improvements for AIX. The AIX networking resolver now uses FFI to detect networking interfaces and IPs. Previously, VLANs and secondary IPs were not displayed. FACT-2878

  • Improved performance for blocking legacy facts. This release improves the performance of blocking legacy facts by implementing a different mechanism. The new mechanism does not allow legacy groups to be overriden by a group with the same name in fact-groups. If you add a legacy group in fact-groups, it is ignored. The new implementation is faster for use cases involving multiple custom facts that depend on core facts. FACT-2917

Resolved issues

  • Facter::Core::Execution does not set status variables in Facter 4. This release reimplements Open3.popen3 to use Process.wait instead of Process.detach. FACT-2934

  • Facter error message — no implicit conversion of nil into String — when determining processor speed on Linux. Facter now handles processor speed values where log10 is not set (3, 6, 9, 12). FACT-2927

  • Facter fails "closed" if the facter.conf file is invalid. Previously, Facter failed when an invalid config file was provided. Facter now logs a warning message stating that the parsing of the config file failed and continues retrieving facts with the default options. FACT-2924

  • Domain on Windows does not prioritise registry. Facter now prioritises information from registry on Windows, instead of network interface domain names. FACT-2923

  • LinuxMint Tessa not recognized. Previously, the os.release fact was retrieved from the /etc/os-release file, but Facter 3 read other release files based on operating system (OS). Now Facter retrieves os.release from the specific release file for every OS. FACT-2921

Facter 4.0.49

Released 20 January 2021 and shipped with Puppet Platform 7.3.0.

Resolved issues

  • Aggregate facts are broken. Previously, Facter broke when trying to add a debug message for the location where aggregate facts are resolved from. This only happened with aggregate facts that returned an array or hash without having an aggregate block call. FACT-2919

Facter 4.0.48

Released 20 January 2021.

Enhancements

  • Rewritten tests for Linux networking resolver. This release refactors the Linux networking resolver, including fixing the unit tests and adding new ones. FACT-2901

Resolved issues

  • Facter 4.0.x does not return the domain correctly when set in the registry. Previously, Facter did not retrieve the domain correctly on Linux and resulted in a faulty FQDN facts. Facter also failed to retrieve domain facts when Windows did not expose the host's primary DNS suffix. This is now fixed. FACT-2882

  • Legacy group blocks processors core fact. Blocking legacy facts no longer blocks processors core fact. FACT-2911

  • Facter Hocon output format. The --hocon option now functions as intended. FACT-2909

  • Legacy blockdevice vendor and size facts not resolving. This release fixes blockdevice_*_size facts not resolving on AIX, and blockdevice_*_vendor facts not resolving on Linux and Solaris. FACT-2903

  • Facter detects OS family without checking or translating the information. Previously, Facter detected the OS family by reading /etc/os-release without checking or translating the information. This is now fixed and Facter translates the id_like field from /etc/os-release to Facter known families. FACT-2902

Facter 4.0.47

Released 15 December 2020 and shipped with Puppet Platform 7.1.0.

New features

  • Added scope6 fact for per binding. This release adds the scope6 fact under every ipv6 address from the interface.bindings6 fact. FACT-2843
  • Support for AWS IMDSv2. This release updates the EC2 fact to use IMDSv2 to authenticate. To use v2, set the AWS_IMDSv2 environment variable to true. Note that the token is cached for a maximum of 100 seconds.

Resolved issues

  • Facter 4 does not resolve hostname facts. Previously, Facter failed when Socket.getaddrinfo was called, which prevented retrieval of FQDN information. This is now fixed. FACT-2894
  • Gem-based Facter 4 does not log the facts in debug mode. This release adds log messages for resolved fact values. FACT-2883

  • Gem-based Facter 4 does not return the complete FQDN. Previously, domain was not retrieved correctly on Linux based systems and resulted in a faulty FQDN fact. This release uses Ruby Socket methods to retrieve domain correctly. FACT-2882

  • Puppet 7 treats non existent facts differently to Puppet 6. This release excludes custom facts with nil value from to_user_output, values and to_hash Ruby Facter API's. The custom facts with nil value are still returned by value, fact and [] API's. FACT-2881

  • Facts failing on machines with VLANs. With this release, dots in legacy fact names are ignored. They are not used as an indicator of a fact hierarchy because legacy facts cannot compose and have a flat (key - value) structure. FACT-2870

  • Facter 4 changes is_virtual fact from boolean to string. This release fixes a regression that caused the is_virtual to be a string instead of a boolean. FACT-2869

  • External facts are loaded when using puppet lookup for a different node. The load_external API method was missing in Facter 4. This is now fixed. FACT-2859

  • Facter fails when the interface name is not UTF-8. Previously, a pointer used to indicate networking information was being released by the GC too early and the memory was overridden, resulting in inconsistent data. The fix extends the scope of the pointer so that the memory it points to does not release prematurely. FACT-2856

  • Failure when a structured custom fact has the wrong layout. This release adds a log message when custom fact names are incompatible and a fact hierarchy cannot be created. FACT-2851

  • Cannot retrieve local facts error. This release fixes an error thrown on systems with a low file descriptor limit. FACT-2898
  • Dig method fails on Puppet $facts. The Facter 4 API method to_hash returned a different data type to Facter 3. This release ensures the to_hash method returns a Ruby Hash instance. FACT-2897
  • Facter fails when trying to retrieve ssh facts. Facter now skips reading ssh keys it does not recognise. FACT-2896
  • Missing primary interface check on all platforms. Similar to Facter 3, this release adds a final check that detects the primary interface from the IP. Localhost IPs are excluded. FACT-2892
  • Facter 4.0.46 breaks virtual flag. Facter now checks whether the /proc/lve/list file is a regular file, instead of checking if it is executable. FACT-2891
  • Facter 4.0.46 does not load external fact files in lexicographical order. This is now fixed. FACT-2874
  • Secondary interfaces are not reported. Networking.interfaces now display secondary interfaces (with or without the label) and the VLANs.MAC address is correctly displayed for bonded interfaces. If DHCP is not found, use the dhcpcd -U <interface_name> command to search. FACT-2872

Deprecations and removals

Update rake task for generating facts and tests. The scripts used to generate facts were outdated and had never been used. This release removes them. FACT-2298

Facter 4.0.46

Released 19 November 2020 and shipped with Puppet Platform 7.4.1.

New features

  • Operating system hierarchy. Facter 4 introduces a hierarchy for operating systems. The hierarchy allows you to load facts from the child and all parents. If the same fact is present in a child and a parent, the one from the child takes precedence. FACT-2555
  • Rake task for mapping fact name and fact class. To improve the visibility of which facts are loaded for an operating system, Facter 4 has a rake task that prints all facts and the class that resolved that fact. FACT-2557
  • Blocklist. Facter 4 allows you to block facts at a granular level — you can block any fact from the fact hierarchy, for both groups of facts and individual facts. FACT-1976
  • Block legacy facts. Legacy facts are a subtype of core facts and you can now block them, like any core fact, using the blocklist from facter.conf. FACT-2259
  • Block custom facts. Facter 4 allows you to block custom facts. You can add the fact to the blocklist from facter.conf. FACT-2718
  • Block external facts. Facter 4 allows you to block external facts. Blocking external facts is different from blocking core and custom facts — you need to specify the name of the file from which external facts are loaded to blocklist in facter.conf. FACT-2717
  • The puppet facts show command. The facter -p and facter --puppet commands have been replaced with puppet facts show. FACT-2719
  • Group for legacy facts. The legacy group contains all the legacy facts. You can find it in lib/facter/config.rb and can block it in facter.conf. FACT-2296
  • The fact-groups group. You can define your own custom groups in facter.conf using the new fact-groups group. The blocklist and ttls groups from facter.conf accept predefined groups, custom groups or fact names. You must use the file name when using external facts. FACT-2331
  • Define fact groups for blocking or caching. You can define new fact groups in facter.conf, and use the group to block or cache facts. FACT-2515
  • External fact caching. To cache external facts, use the filename of the external fact when setting the ttls in facter.conf. FACT-2619

Enhancements

  • CLI compatible with Facter 3. Facter 4 reimplemented the Facter 3 command line interface using thor gem. FACT-1955
  • Loaded facts based on operating system hierarchy. To improve performance, Facter 4 only loads the files and facts that are needed for the operating system it is running on. FACT-2093
  • Log class name in log messages. Improved logging in Facter 4 prints the class from which the log was generated. FACT-2036
  • Restored --timing option to native facter. The restored --timing and -t arguments allow you to see how much time it took each fact to resolve. FACT-1380
  • (Experimental). Reverted parallel resolution of facts. To improve performance, facts are resolved in parallel on JRuby. FACT-2819
  • Timeout on resolution. You can now specify the timeout attribute in custom fact options. FACT-2643
  • Caching core facts . To cache core facts, add the fact group to facter.conf ttls. Fact values are stored and retrieved on future runs. After the ttls expires, the fact is refreshed. FACT-2486

Resolved issues

  • Fix Ruby 2.7 warning on Facter 4. Facter 4 now supports Ruby 2.7. FACT-2649
  • Facter does not support timeout for shell calls. External commands have a timeout, and if they do not complete in the given time, they are forced stop. The default timeout is 300 seconds. You can now specify a timeout using the limit attribute in Facter::Core::Execution.execute. FACT-2793
  • Fact names are treated as regex and can lead to caching of unwanted facts. The regex used to detect facts has been improved to distinguish between fact groups and legacy facts. FACT-2787
  • Facter uptime shows host uptime inside docker container. Previously, the kernel only reported the host uptime inside a Docker container. You can now see the container uptime. FACT-2737
  • A fact present in two groups does not get cached if the second groups has a ttls. If a fact is present in two groups, and both of them have a ttls defined in facter.conf, the lowest ttls is takes precedence. FACT-2786