Issue #14710 has been updated by Brent Hensarling.

Solved!  The puppetmaster's .bashrc was setting a different RUBYLIB path than 
what the crontab was using.  We found the discrepancy and have now updated 
cron's RUBYLIB path to match the .bashrc file.  This clearly explains why the 
issue was only occurring when executing Facter via Cron.  Please close this 
ticket - no bug to be reported - only foolishness!

Thanks again for the help,
JP 
----------------------------------------
Bug #14710: Facter outputs an error when a script that runs "facter -p" is 
launched via Cron.
https://projects.puppetlabs.com/issues/14710#change-64141

Author: Brent Hensarling
Status: Needs More Information
Priority: Normal
Assignee: Brent Hensarling
Category: 
Target version: 
Keywords: 
Branch: 
Affected Facter version: 1.6.6


Hello,

I have noticed that our puppetmaster outputs a strange error when it tries to 
run a BASH script via Cron that runs "facter -p" within the script.  Here is 
the error that Cron sends to us via email:

Cron Daemon [email protected]
/var/lib/puppet/lib/puppet/facter: Is a directory - 
/var/lib/puppet/lib/puppet/facter (Errno::EISDIR)
       from /usr/bin/facter:19:in `load'
       from /usr/bin/facter:19
/var/lib/puppet/lib/puppet/facter: Is a directory - 
/var/lib/puppet/lib/puppet/facter (Errno::EISDIR)
       from /usr/bin/facter:19:in `load'
       from /usr/bin/facter:19

I have attached 2 examples of scripts that generate this issue.  Our 
puppetmaster has Facter 1.6.6 and Puppet 2.7.9 installed.  O/S is CentOS 5.5.  
Google searches didn't reveal much information about the  problem.  The only 
threads I found that even referenced the same error output can be found here:

http://www.puppetlogs.com/puppet/%23puppet-2011-06-27.log.html
http://groups.google.com/group/puppet-users/browse_thread/thread/7a1b95adca7c17af/2cceda3ad28422ae

It should be noted that running "facter -p" on the machine via the command line 
produces no issues at all.  Nor do any errors occur when running the script 
from the command line as well.  We only see this issue when the attached 
scripts are launched via Cron.

Can you please advise if this is a possible bug in Facter, or if it's something 
we're doing wrong on our end.  Let me know if you need any further debugging 
information from me

Thanks!
JP Baysari
Luma Pictures


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to