1

Introduction

It occurs a number of times a day that changes on the Puppetmaster are not recognized immediately by the Puppet agents. If this is the case Puppet needs to be run more than 5 times (e.g. X<5min) before the changes are recognized.

  • Puppet version: 3.7.3
  • X>100 Puppet-agent nodes
  • One Puppetmaster

Expected

Changes on Puppetmaster should be recognized by Puppet-agent immediately always

Attempts

One of the attempts to solve the issue was executed after reading this documentation:

Puppet includes a basic puppet master web server based on Ruby’s WEBrick library.
(This is what Puppet uses if you run puppet master on the command line or use
most puppetmaster init scripts.)

You cannot use this default server for real-life loads, as it can’t handle 
concurrent connections; it is only suitable for small tests with ten nodes 
or fewer. You must configure a production quality web server before you
start managing your nodes with Puppet.

Any Rack-based application server stack will work with a puppet master, but if 
you don’t have any particular preference, you should use Passenger combined 
with Apache. This guide shows how to configure Puppet with this software.
  1. Run puppetmaster using Passenger.
  2. Another attempt was to stop the automatic run of puppet on Puppet-agent nodes every 30 minutes

Current

The attempts did not solve the issue, i.e. changes on the Puppetmaster are not immediately recognized by the Puppet-agent

030
  • 5,731
  • 12
  • 61
  • 107

1 Answers1

3

This is likely a problem with caching of the environments - by default in 3.7, data from an environment on the filesystem will be cached for 3 minutes, so changes are not visible to the agent nodes until that cache has expired.

Adjust the master's environment_timeout to get the behavior you want, with the warning that going with 0 to avoid caching completely can have some nasty performance implications.

Shane Madden
  • 112,982
  • 12
  • 174
  • 248
  • At the moment all automatic runs are disabled. A couple of times on a day, the issue occurs. Could you indicate the impact of the performance implications? I will try this and let you know asap if this works. – 030 Jan 14 '15 at 18:54
  • @utrecht Try adjusting the cache timer and see if it helps. – Shane Madden Jan 14 '15 at 18:55
  • Thank you. I will try it and let you know the outcome. I will change the setting tomorrow, let it run for a week and let you know the outcome. – 030 Jan 14 '15 at 18:57
  • 1
    [This link](http://puppet-a-day.com/blog/2014/05/20/puppet-caching/) suggests that touching `tmp/restart.txt` in the rack directory after changing configuration will take care of cache invalidation. – fuero Jan 14 '15 at 19:45