On Friday, April 24, 2015 at 9:35:12 AM UTC-5, David Evans wrote:
>
> Hi,
>
>
> I notice that when I provision a host and puppet runs for the first time 
> that it does not deliver all the change necessary for the next puppet run 
> to be 'quiet'.  In fact it can take several runs before the host is 
> up-to-date.  I have three concerns around this:
>
>
> 1. If I am spinning up a virtual host there may be a user requirement to 
> start using it immediately - whereas it may take 90 minutes or more for 
> puppet to complete (with 30 minute frequency of runs).
>


You can always run the agent manually to avoid the 30-minute gap between 
runs.

 

> 2. Is this behavior symptomatic of badly written puppet code?
>


Yes.  There may be other contributing factors, but certainly if more than 
two runs are required then one of the problems is badly written Puppet code.

 

> 3. I'm worried about a change that is partially delivered on a live system 
> (post provisioning) - a host that is in a good state before and after a 
> change may be in an unusable with part of the change applied.
>
>

That is a reasonable concern.  It is a good reason to test your manifest 
and data changes in a QA environment before applying them to production 
machines.

 

> I'd like to know if there is a way that I can specify that a puppet run 
> should iterate until all the available change has been applied?
>

It wouldn't be too hard to write a script around something like 'puppet 
agent --no-daemonize --detailed-exitcodes' to achieve that behavior.

 

>  Or is there something I'm missing in my code to prevent this happening?
>

There is.  Catalog application failures that can be resolved by iterating 
Puppet runs generally arise from failure to properly specify 
order-of-application relationships.  This is what the 'before' and 'after' 
metaparameters and the chaining arrows are for.  There are occasionally 
details that simply cannot be handled all in one run, but these are rare.  
If you encounter one, then the way to resolve it is normally via your 
new-machine provisioning process.
 

John

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/32bf46a3-0475-45f9-8cdf-0fc888126e97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to