Ask Your Question

What's the best solution to support puppet agent run in both one-time and daemon mode?

asked 2013-03-19 01:15:36 -0500

Steven Lu gravatar image

updated 2013-03-19 02:51:55 -0500

I'm trying to run puppet node in daemon mode like ensure system file configuration consistent as it should be, while I also have some cases that some urgent fixes/software configuration should be applied on some nodes immediately.
I take the puppet master-slaves topology, puppet master is configured as ENC mode to fetch node configuration through one centralized repository. So I implement a simple ENC service to retrieve node configuration then compile to yaml output.

Current solution is that I have to setup two puppet masters with two ENC service instances, one is for daemon puppet run and configured ...


edit retag flag offensive close merge delete


Daenney gravatar imageDaenney ( 2013-03-19 07:44:22 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-03-19 02:46:13 -0500

KlavsKlavsen gravatar image

updated 2013-03-19 02:46:42 -0500

why do you want to do that?

You can just have puppet run as a daemon - and then force runs, using mcollective (or simple ssh keys with commands, running puppet agent -t).

your forced run, then will only NOT run - if the puppet daemon is actually doing a run in just that second.

Ohh - and you should NEVER have a seperate master for adhoc runs.

edit flag offensive delete link more

answered 2013-03-19 03:25:03 -0500

Steven Lu gravatar image

KlavsKlavsen, Thanks a lot for your quick response.

Current requirement is that node configuration is not pre-defined, it's saved/updated by upstream component which will put into one centralized repository(simply Oracle database).
ENC service has the knowledge to analyze/parse yaml output based on hostname.

1.Workflow of One-Time Mode:

MCollective -> Trigger Puppet Agent Run -> Send request to Puppet Master -> Fetch yaml through configured ENC service -> Send back catalogs to Puppet Agent -> Actually Puppet Agent run

2.Workflow of Daemon Mode:

Puppet Agent Run at Interval(default every 30 minutes) -> Send request to Puppet Master -> Fetch yaml through ... (more)

edit flag offensive delete link more


couldn't you simply set a different ENC for a diff. environment in puppet.conf - so daemon mode is run with normal production env. - and one-time runs with --environment onetime ...(more)

KlavsKlavsen gravatar imageKlavsKlavsen ( 2013-03-21 03:15:19 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-03-19 01:15:36 -0500

Seen: 472 times

Last updated: Mar 19 '13