Skip to content

Commit 68d9ac4

Browse files
authored
Merge pull request #9474 from puppetlabs/backport-9458-to-7.x
[Backport 7.x] Clarify soft limit on number of facts
2 parents 3e6ed12 + 87eec4c commit 68d9ac4

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lib/puppet/configurer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def convert_catalog(result, duration, facts, options = {})
130130
end
131131

132132
def warn_number_of_facts(size, max_number)
133-
Puppet.warning _("The current total number of facts: %{size} exceeds the number of facts limit: %{max_size}") % { size: size, max_size: max_number }
133+
Puppet.warning _("The current total number of fact values: %{size} exceeds the fact values limit: %{max_size}") % { size: size, max_size: max_number }
134134
end
135135

136136
def warn_fact_name_length(name, max_length)

lib/puppet/defaults.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,9 @@ def self.initialize_default_settings!(settings)
17681768
:number_of_facts_soft_limit => {
17691769
:default => 2048,
17701770
:type => :integer,
1771-
:desc => "The soft limit for the total number of facts.",
1771+
:desc => "The soft limit for the total number of fact values. This counts the
1772+
child elements of all facts (e.g. all items of an array or a hash), not just top
1773+
level facts.",
17721774
},
17731775
:payload_soft_limit => {
17741776
:default => 16 * 1024 * 1024,

spec/unit/configurer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
}
269269
Puppet::Node::Facts.indirection.save(facts)
270270

271-
expect(Puppet).to receive(:warning).with(/The current total number of facts: [1-9]* exceeds the number of facts limit: [1-9]*/)
271+
expect(Puppet).to receive(:warning).with(/The current total number of fact values: [1-9]* exceeds the fact values limit: [1-9]*/)
272272
configurer.run
273273
end
274274

0 commit comments

Comments
 (0)