Greetings!
Please review the pull request #127: Ticket/2.7.x/8341 prevent duplicate loading of facts opened by (adrienthebo)
Some more information about the pull request:
- Opened: Mon Sep 19 21:59:10 UTC 2011
- Based on: puppetlabs:2.7.x (18afb3a5262b1447c6bb2f21e5ecb3262d004777)
- Requested merge: adrienthebo:ticket/2.7.x/8341-prevent_duplicate_loading_of_facts (747ffd2bca307446ea3a51aa0da917770b032ede)
Description:
If there were duplicate file paths in puppet's modulepath, fact files in
the modulepath would be loaded for every instance of the directory in
the modulepath. The resolution to this was to unique the list of directories
to load facts from.
Thanks!
The Pull Request Bot
Diff follows:
diff --git a/lib/puppet/indirector/facts/facter.rb b/lib/puppet/indirector/facts/facter.rb
index 6312a95..0f38ba3 100644
--- a/lib/puppet/indirector/facts/facter.rb
+++ b/lib/puppet/indirector/facts/facter.rb
@@ -15,7 +15,7 @@ class Puppet::Node::Facts::Facter < Puppet::Indirector::Code
end
end.flatten
dirs = module_fact_dirs + Puppet[:factpath].split(File::PATH_SEPARATOR)
- x = dirs.each do |dir|
+ x = dirs.uniq.each do |dir|
load_facts_in_dir(dir)
end
end
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
