In trying to work out the environmental differences, I _have_ noticed that 
the daemon runs as the puppet user, but when I run it interactively, it 
runs as root. As root, it works, as puppet, it works, but from root's 
crontab, it doesn't.

What I failed to mention before is that the failure scenario is that I'll 
get a "Could not evaluate: Could not retrieve file metadata for 
puppet:///modules/ourlib/pip.conf: end of file reached". It's always the 
same file, but that file works just fine for most hosts and works as 
described above. It's just that root's crontab doesn't play nice on some 
systems. Scratching my head.

On Monday, August 8, 2016 at 8:40:24 AM UTC-4, Bret Wortman wrote:
>
> We've been using cron to manage our puppet agents for the past few years 
> but have discovered some issues where it's running under a different 
> environment and is having trouble completing when run in cron, but it works 
> fine as a daemon or from the command line. So I'm preparing to switch over.
>
> Unfortunately, the following doesn't work for my 3.8.6 agents on Centos 6 
> systems even though it works fine for 4.3 agents:
>
> service { "puppet":
>     ensure => running,
>     enable => true,
>     hasstatus => true,
>     hasrestart => true,
> }
>
>
> What we see on some agents is that puppet will restart the service each 
> and every time it runs, which gives us lots of false "changes".
>
> # service puppet status
> puppet dead but pid file exists
> # ps aux | grep puppet | grep agent
> root      9879  0.0  0.0 134404 43516 ?       Ss     12:22    0:00 
> /usr/bin/ruby/usr/bin/puppet agent
>
>
> Has anyone else seen this or know of a workaround? I've tried various ways 
> of providing a "status => " command but haven't found anything that works 
> yet.
>

-- 
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/60e9ca91-f7a0-4ac3-a94a-791d31184d49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to