On 16/09/14 14:30, jcbollinger wrote:
On Tuesday, September 16, 2014 4:44:32 AM UTC-5, Jonathan Gazeley wrote:
Overnight my Facter seems to reporting new errors. As far as I can
see,
neither Puppet, Facter, MCollective or the facts in question were
updated, so I'm struggling to find a cause. The problem as
exacerbated
because MCollective is emailing me with the same error every 15
minutes.
This error is printed when I run facter:
Error loading fact /var/lib/puppet/lib/facter/warranty.rb: no such
file
to load -- facter/util/warranty
The fact is provided by this module (my module, but not my code)
https://forge.puppetlabs.com/jgazeley/dell
<https://forge.puppetlabs.com/jgazeley/dell>
The file /var/lib/puppet/lib/facter/warranty.rb does exist on my
system
and is readable as is the referenced submodule in
/var/lib/puppet/lib/facter/util/warranty.rb , so I am not sure
what is
causing the problem.
My first guess would be a load path problem. If you're willing to
limit your module to Ruby 1.9+, then you could try replacing the
offending 'require' call with
require_relative 'util/warranty'
Even if you don't want that Ruby version constraint, it might be
illuminating to see whether 'require_relative' in fact does solve the
problem.
For testing only, you could also consider printing the $LOAD_PATH just
before executing the 'require'.
And speaking of Ruby version, are you certain /that/ didn't change on
you? Clearly something did.
John
Thanks for your detailed response. We're running Ruby 1.8.7, the
standard packaged with CentOS 6. We're unwilling/unable to switch to a
newer Ruby from another source, especially as we're a university and the
freshers are arriving this weekend! The penalty for breaking IT systems
in the run-up to the start of term isn't worth thinking about ;)
Permissions on the files in question and their parent directories shows
that the files should be world-readable. We're not using POSIX ACLs. We
are experienced users of SELinux and I can also confirm that the audit
log shows nothing of relevance. Running in Permissive mode doesn't help.
The facts that my module installs have the same SELinux contexts as
other facts.
I checked over the yum.log and nothing was updated at the time that
these symptoms started happening on 3 servers at the same time. Nothing
was changed in the puppet.log, and nobody updated any Forge modules etc.
The 3 servers are all Dell of the same hardware generation. Other Dell
servers in our estate were not affected.
Attempting to use require_relative with Ruby 1.8.7 yields "undefined
method `require_relative' for main:Object"
Printing the $LOAD_PATH does not list /var/lib/puppet/lib/facter/ when
executing facter or facter -p as my user. It does not print any paths
when I execute facter as root.
I don't really know my way around Facter and Ruby so I'm sort of
shooting in the dark here trying to understand how it *should* work, and
then working out why mine is different.
Thanks,
Jonathan
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/541843C8.7070503%40bristol.ac.uk.
For more options, visit https://groups.google.com/d/optout.