Pushing file updates - taking a long time

33 views
Skip to first unread message

KC1987

unread,
Jun 18, 2013, 6:13:27 PM6/18/13
to puppet...@googlegroups.com
Hi.

First off my situation is this;
I have a module that's split up in such a way that it runs as follows:
Install packages => Ensure files are present => insure service is running.

Now say I have a stable cluster up and running. I want to push a new file change on a configuration to all slaves;

Is there any reason puppet would try to install packages and start services again?

Any help appreciated. Thank you.

Denmat

unread,
Jun 19, 2013, 6:44:36 AM6/19/13
to puppet...@googlegroups.com
Well depending on what your code looks like I would say;
Install packages - unlikely
Restart services - more likely.

Notifies or subscribes to config files may or may not restart services - depends really..what you doin?

Den
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

jcbollinger

unread,
Jun 19, 2013, 9:19:04 AM6/19/13
to puppet...@googlegroups.com


Sure there is.

Puppet will attempt to install / update packages if it doesn't think the ones currently installed satisfy the relevant Package declarations.  Note that it will always check all declared Package resources -- don't confuse that with trying to install or update packages.  There are not many config files you could change that would alter Puppet's opinion about whether Packages are in sync with your declarations, but there are a few.

Starting / restarting services is rather more likely, as denmat said.  If you have declared that a given Service should be running, then Puppet will attempt to ensure that it is running, every time the agent runs.  Moreover, if you have made a Service subscribe to changes to its config file (or any other file), or set up the config file to notify the service of changes, then Puppet will restart the service each time it changes the file while the service is running.

A key question here is whether Puppet attempts to install / update packages or (re)start services if you run it when not expecting any changes.  You perform such runs all the time if you run the agent on a fixed schedule, but you might not do if you run it only when you think you have changes to apply.  In other words, you should verify that the unexpected behavior is actually correlated to config file changes, and not a routine outcome of your manifests.  The likely causes of the problem are quite different in one case than in the other.


John

KC1987

unread,
Jun 19, 2013, 10:57:03 AM6/19/13
to puppet...@googlegroups.com
Figured it out. Someone had put

ensure => running,

on a package :(
Reply all
Reply to author
Forward
0 new messages