I have a custom fact. It syncs correctly, works correctly everywhere when run via ''facter'', and works correctly from puppet on all but one machine.>From ''facter'':# export FACTERLIB=/var/puppet/facts # /opt/puppet/bin/facter itg_location mel But from within puppetd I get: Sep 13 14:54:29 hordac puppetd[768]: [ID 702911 daemon.warning] Could not load fa ct /var/puppet/facts/itg_extras.rb: unsupported address family Sep 13 14:55:49 hordac puppetd[768]: [ID 702911 daemon.error] Could not retrieve configuration: No matching value for selector param '''' at /etc/puppet/manifests/n odes/00-unix.pp:10 Again, this works from both on the other ten machines I have puppet installed on. Unfortunately I''m a bit of a beginner with Ruby so the code is probably really dreadful, but I''ve attached a copy with the network addresses modified. Any hints or suggestions would be greatly appreciated. Matt _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Thu, Sep 13, 2007 at 03:24:28PM +1000, Matt McLeod wrote:> I have a custom fact. It syncs correctly, works correctly everywhere > when run via ''facter'', and works correctly from puppet on all but one > machine.A Gentoo machine, perchance? Simple things to check: are all machines the same OS, distro, release, Ruby version, Puppet version, Facter version, CPU architecture, and so on? Differences between the machine that doesn''t work and those that do would be handy to know.> # export FACTERLIB=/var/puppet/facts > # /opt/puppet/bin/facter itg_location > mel > > But from within puppetd I get: > > Sep 13 14:54:29 hordac puppetd[768]: [ID 702911 daemon.warning] Could not > load fact /var/puppet/facts/itg_extras.rb: unsupported address familyThe error "unsupported address family" error has been seen before in the context of machines (mostly Gentoo, hence my question above) that don''t have IPv6 support built into the kernel or Ruby or something. It''s strange that the fact works in facter but not in Puppet, but who knows what might be causing that...> Unfortunately I''m a bit of a beginner with Ruby so the code is probably really > dreadful, but I''ve attached a copy with the network addresses modified. Any > hints or suggestions would be greatly appreciated.Apart from some funky indenting, and the fact that I''d avoid symbols in the results of facts to minimise insanity, nothing leaps out at me as being obviously wrong, and certainly nothing that would immediately trigger some sort of "aiee! IPv6!" reaction (then again, who knows what IPAddr does to get the job done). Best to run puppetd with --debug --trace, and see whether there''s any more useful information about where the exact problem is happening: "Could not load fact" is light on meaty details. - Matt
On Thu, 2007-09-13 at 16:21 +1000, Matt Palmer wrote:> On Thu, Sep 13, 2007 at 03:24:28PM +1000, Matt McLeod wrote: > > I have a custom fact. It syncs correctly, works correctly everywhere > > when run via ''facter'', and works correctly from puppet on all but one > > machine. > > A Gentoo machine, perchance?Nope. Solaris 10 on Opteron.> Simple things to check: are all machines the same OS, distro, release, Ruby > version, Puppet version, Facter version, CPU architecture, and so on? > Differences between the machine that doesn''t work and those that do would be > handy to know.Identical versions of everything on every machine. I built the packages myself.> Best to run puppetd with --debug --trace, and see whether there''s any more > useful information about where the exact problem is happening: "Could not > load fact" is light on meaty details.Rather weirdly, running with --debug --trace caused it to be able to use the fact and now it Just Works. So while I have no clue why it wasn''t working, it is at least working now. Matt