Puppet agents seems to go haywire from time to time

asked 2017-02-13 02:10:46 -0500

Tozz gravatar image

We are running a Puppet system with 1 master and +/- 300 agents. The agents are daemonized (by which I mean that we do not run agents using CRON). We are having two issues, which I cannot pinpoint:

1) Agents sometimes stop working (return errors) and need a restart. This seems to have some correlation with temporary manifest syntax errors. eg. someone makes an typo in a manifest, which breaks 100 agent runs. The typo is fixed, 99 agents run fine the next run, 1 agent keeps complaining about 'no parameter named ensure'. This agents needs a restart to resolve the issue.

2) Changes in files are sometimes not picked up by the agents, until we restart the agent. Sometimes I notice that when I do a manually agent run (eg. puppet agent -t in the commandline) it picks up changes in files we made months ago. The agents seem to run just fine (no errors, everything looks fine)

I believe both issues are a bug, but I was wondering if anyone is seeing the same.

The first issue comes with a log:

Feb 13 08:57:44 pm7 puppet[32116]: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:361: warning: already initialized constant CREATORS
Feb 13 08:57:44 pm7 puppet[32116]: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:361: warning: previous definition of CREATORS was here
Feb 13 08:57:44 pm7 puppet[32116]: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:362: warning: already initialized constant SOURCE_ONLY_CHECKSUMS
Feb 13 08:57:44 pm7 puppet[32116]: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:362: warning: previous definition of SOURCE_ONLY_CHECKSUMS was here
Feb 13 08:57:50 pm7 puppet-agent[11099]: Failed to apply catalog: no parameter named 'ensure'
Feb 13 08:57:50 pm7 puppet[32116]: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:70:in `exit': no implicit conversion from nil  to integer (TypeError)
 Feb 13 08:57:50 pm7 puppet[32116]: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:70:in `block in run_in_fork'
Feb 13 08:57:50 pm7 puppet[32116]: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:67:in `fork'
Feb 13 08:57:50 pm7 puppet[32116]: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:67:in `run_in_fork'
Feb 13 08:57:50 pm7 puppet[32116]: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run'
Feb 13 08:57:50 pm7 puppet[32116]: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
Feb 13 08:57:50 pm7 puppet[32116]: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
Feb 13 08:57:50 pm7 puppet[32116]: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
Feb 13 08:57:50 pm7 puppet[32116]: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/daemon.rb:170:in `block in run_event_loop ...
(more)
edit retag flag offensive close merge delete

Comments

What is the version of your puppet master? What is the version of your puppet agents?

reesek gravatar imagereesek ( 2017-02-14 20:40:37 -0500 )edit

We use Puppetserver 2.2.1-1puppetlabs1 (Official puppetlabs repo for Debian Jessie). Agent versions differ somewhat from host to host, but a machine that recently gave the 'no parameter named ensure' runs 1.9.1-1wheezy, from the official Puppetlabs repo for Debian Wheezy.

Tozz gravatar imageTozz ( 2017-02-15 01:54:52 -0500 )edit