On 9/11/13 8:54 AM, jcbollinger wrote:
Lack of response? This is a volunteer community forum, not a paid technical support service. Give it some time.
No offense intended. I'm continually impressed by the effort made by the volunteers who watch this lists and provide so much help.
Before you open a bug report, you should make sure that the file containing your custom fact(s) is readable by the Puppet agent service. That facter can read the file when you run it from the command line does not prove that. Even though the agent runs as a privileged user (or should), access could still be blocked in various ways, such as 1. Mandatory access controls (a.k.a. SELinux in enforcing mode) could allow you to read the file, but prevent the agent service from doing so. 2. If /etc/facter/facts.d is on an NFS-mounted filesystem that performs root-squashing, then the agent may have less permissions on it than you, personally, do. There are probably other means. Also, make sure Puppet is using the same Facter that you are using from the command line. If you have multiple versions installed then all manner of havoc might ensue. You might get multiple versions by installing them from gem or from source into different Ruby libraries, or into different parts of the same Ruby lib.
All good ideas. An strace of "puppet agent --test" (and/or the test manifest above) shows that puppet is able to read the fact file (and, yes, it's on the local disk), and the the version of facter being loaded is the correct (and only) one (in my case, the RPM version 1.7.2, from /usr/lib/ruby/site_ruby/1.8/facter.rb and friends), and still show the custom facts as undef.
Even if I reduce my custom facts to a single file containing a single trivial line ("somefact=somevalue"), the custom fact shows up in facter but not in puppet.
I also get the same result when I pass the fact as yaml. I tried json, but got an error about missing the json gem, even though I have the puppetlabsdep rubygem-json RPM installed.
-- David Thompson Waisman Center Brain Imaging and Behavior Lab 1500 Highland Ave. Room T133 Madison, WI 53705-2280 (608) 265-6608 dthompson (at) waisman (dot) wisc (dot) edu -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.