summaryrefslogtreecommitdiff
path: root/manifests/debian.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2012-08-10 12:32:29 -0400
committervarac <varacanero@zeromail.org>2012-08-10 18:43:57 +0200
commit1d3e2b5bd6788894c49d8db6ab65f67b0540b87d (patch)
tree8e4e7b2670c92df9225138beade5bdd005c155d4 /manifests/debian.pp
parentc5a275505bf2aafb9378d923985f9915e81ce7a7 (diff)
Fix puppet attempting to change the puppet service from 'stopped' to running on each run:
notice: /Stage[main]/Puppet::Base/Service[puppet]/ensure: ensure changed 'stopped' to 'running' When running in cron mode, you do not want the puppet service enabled, nor do you want it 'running'. When enabling the cron mode, the first part of puppet::cron::base does a Service override on the puppet service to set enable => false. That is a good thing, but all it does is make the service setup so it wont be run on boot. Unfortunately, the puppet service definition also has a 'ensure => running' which does an /etc/init.d/puppet status and then starts the service if it is not running. In a cron-only setup, the 'status' command results in a failure, because the daemon is not running, and then puppet attempts to start it, which goes nowhere because the /etc/default/puppet is configured not to start. So, looking further at puppet::cron::base we see there is a case switch, testing on operatingsystem and if its debian/ubuntu (or openbsd) it falls out of the case. If it is not one of those, it continues and does a test to see if the version of puppet is 2.6 and if so then it does an additional puppet Service override to set ensure=> stopped which keeps the service from being checked to see if it is running, and if it is not starting it. So to fix this, we remove debian/ubuntu from the case, so it will continue through and then we change the $puppet_majorversion test to look for anything greater than or equal to '2.6', since 2.7 and later are also versions we want this to work with. After this change, we no longer get the attempt to restart puppet on every run.
Diffstat (limited to 'manifests/debian.pp')
0 files changed, 0 insertions, 0 deletions