0

We have just started using Puppet on our QA environments. All along, I was under the impression that the agents pull the catalog from the master only when puppet is restarted on the agent nodes or only when initiatialized from command line. But yesterday, I was working on a few puppet scripts and was restarting puppet agent every now and then on our test nodes to pull the new catalog, but unfortunately, and unknown to me, the other agents were pulling the test catalogs too (which created a whole lot of undesirable changes on them). No one had restarted puppet on the other nodes. I checked the /var/log/message and realized that it was pulling the catalog from the master node every 30 minutes from day one without the need for a puppet restart. I have the following questions now:

1) When the puppet service is running on puppet agent (ie. daemonized mode), am I right in assuming that it pulls the catalog from the master every 30 minutes and that is the expected behaviour?

2) Where can I control the time interval between each pulls?

3) Is there a way I can stop puppet service on the agents push the catalogs from puppetmaster whenever I wish to?

2

Where can I control the time interval between each pulls?

One method would be to Stop/Disable the service. Trigger the agent via cron, or whatever method you like. You can also update the puppet.conf and set the runinterval. The advantage of cron (or other task scheduler) method is that the agent doesn't stay running in the background. For systems you are want to manually trigger, or have a long refresh cycle, it might not make much sense to leave the daemon running 24/7.

When the puppet service is running on puppet agent (ie. daemonized mode), am I right in assuming that it pulls the catalog from the master every 30 minutes and that is the expected behaviour?

Yes that is normal and expected assuming the default configuration. But there are many ways you can configure puppet. Running it as a daemon is not required, using the default intervals is not required.

Is there a way I can stop puppet service on the agents push the catalogs from puppetmaster whenever I wish to?

Well the simple method would be to just disable the service and some one of the parallel ssh tools to connect to all the hosts and issue a puppet agent --test. You could also setup mcollective or another orchestration tool. There is a feature (that is being deprecated where an agent could be set to listen on a port, and could be remotely 'kicked' to trigger a catalog run. This feature is being dropped since most people don't use it, and there are several alternatives that provide this functionality like the two I mentioned.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.