Ask Your Question

Updating Puppet Agents

asked 2014-01-09 14:35:46 -0600

nathanlong85 gravatar image


I have a module in place that verifies that the version of puppet installed on each host is exactly the one I want. The problem is that when I specify new version, it'll go through and update each host but it won't start the agent back up. This is odd because when do a "yum upgrade puppet facter" while puppet is running, it'll install it and restart the service for me. If I do it via puppet it'll apply the configuration, install the new version, and puppet just disappears.

I've also tried restarting the ... (more)

edit retag flag offensive close merge delete


I guess I should also mention that I'm running CentOS 6 (5 on a few)

nathanlong85 gravatar imagenathanlong85 ( 2014-01-09 15:49:28 -0600 )edit

5 Answers

Sort by ยป oldest newest most voted

answered 2014-02-09 04:21:52 -0600

I use an exec which subscribes on puppet package and puppet.conf file resource which does a "nohup /etc/init.d/puppet restart &" command wich runs prior puppet service resource. So far this worked nicely. Another option is to not run puppet as daemon but via cron.

edit flag offensive delete link more

answered 2014-01-10 05:44:48 -0600

Zathras gravatar image

Got the same problem on Ubuntu. I am thinking about creating a cron job, that will restart the puppet agent once a day. Or totally forgetting about puppet service and running puppet agent -t solely via cron.

edit flag offensive delete link more


I thought about the cron approach too... I just feel like there has to be "Puppet Recommended" way to do this somewhere out there!

nathanlong85 gravatar imagenathanlong85 ( 2014-01-10 09:46:10 -0600 )edit

answered 2014-01-10 11:25:06 -0600

ethrbunny gravatar image

What about adding a service tag with ensure=>running?

edit flag offensive delete link more


This is the standard way of working with services, yes. But because we restarting the puppet agent, I am guessing that puppet agent issues something like service puppet stop and ...(more)

Zathras gravatar imageZathras ( 2014-01-15 04:02:03 -0600 )edit

Yeah, I tried a service tag initially and it didn't work.

nathanlong85 gravatar imagenathanlong85 ( 2014-01-15 11:19:41 -0600 )edit

answered 2014-01-15 11:23:32 -0600

nathanlong85 gravatar image

It seems that the best way to do this in my environment is to use Spacewalk or something similar. With Spacewalk I'm able to easily schedule puppet updates for any number of systems I want. After the update, puppet is back up.

I'm not exactly sure what you'd have to do if you had other distros in your environment that Spacewalk can't manage... I'd still be interested to hear how other people handle this.

edit flag offensive delete link more

answered 2014-01-10 15:17:27 -0600

ramindk gravatar image

In my experience it is best to use a different process to upgrade Puppet than Puppet. The problem is that updating the package can cause the daemon to exit. Updating facter can break the running Puppet daemon as well.

The process I use involves using mcollective to stop the daemon, then install the new facter, puppet, or puppet-common depending on the distro. Once the packages are in place start the daemon. The method doesn't really matter as long as it's outside of the Puppet agent run.

Bonus problem: Puppet agent restarts the Puppet master its connecting to and ... (more)

edit flag offensive delete link more


That's what I was afraid of... I'm working on setting up a Spacewalk server right now anyway, I guess maybe I can use that to push out the ...(more)

nathanlong85 gravatar imagenathanlong85 ( 2014-01-10 15:54:32 -0600 )edit

I'd be interested to hear how Spacewalk goes. Under Ubuntu the process tends to hang instead of never restarting.

ramindk gravatar imageramindk ( 2014-01-10 16:22:36 -0600 )edit

As a side note, I wouldn't spend too much time with Spacewalk. The Satellite 6 product is currently in beta which encompasses Foreman/Katello/Pulp. I would look into ...(more)

josh gravatar imagejosh ( 2014-01-11 10:33:48 -0600 )edit

The problem with Katello is that it doesn't support CentOS 5. I still have a few of those in my environment and need to remain compatible with them. I ...(more)

nathanlong85 gravatar imagenathanlong85 ( 2014-01-15 11:25:03 -0600 )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: 2014-01-09 14:35:46 -0600

Seen: 512 times

Last updated: Feb 09 '14