After upgrading to Puppet Enterprise 2021.4, you get a warning about having too many facts, too many top level facts, or having a fact name or value with a length that’s too long.
Error messages
Warning: The current total number of facts: 2419 exceeds the number of facts limit: 2048
In PE 2021.4, warning messages were added to increase awareness that the length of fact names, values and number of facts, and top level facts affect performance. Each of the following settings has a default limit. If the limit is exceeded, you get a warning message:
fact_name_length_soft_limit
, default value 2560 bytes: The soft limit for the length of a fact name.fact_value_length_soft_limit
, default value 4096 bytes: The soft limit for the length of a fact value.top_level_facts_soft_limit
, 512: default value The soft limit for the number of top level factsnumber_of_facts_soft_limit
, 2048: default value The soft limit for the total number of facts.
Version and installation information
PE version: 2021.4 and later
Solution
If you do not have performance issues with your fact set, you can increase the soft limit for these settings based on your current fact set in puppet.conf
using the puppetlabs-inifile
module’s ini_setting
resources.
-
Use the instructions in the
inifile
README to set up the module. -
For example, to manage the
top_level_facts_soft_limit
setting, add the followingini_setting
resource to a class:$conf_dir = $facts['os']['family'] ? { 'windows' => "${facts['common_appdata']}/PuppetLabs/puppet/etc", default => '/etc/puppetlabs/puppet' } ini_setting { 'puppet agent: top_level_facts_soft_limit': ensure => present, path => "${conf_dir}/puppet.conf", section => 'agent', setting => 'profile', value => '516' }
-
Apply the class to a node group with the affected nodes.
To do a one-time change of the setting with a task, use the
puppetlabs-puppet_conf
task. Learn more about using tasks from our documentation.
After you make the change, you won’t get the warning message again. You can also set the soft limit to 0
to stop warnings. However, since the messages are intended to keep you from having performance problems, we recommend keeping them in place.
Learn more about the settings to check fact limits in our documentation.
Comments
0 comments
Please sign in to leave a comment.