Issue #2658 has been updated by R.I. Pienaar aka Volcane.

Ryan Miller wrote:

> Why is it better to define dependencies on abstract stages than make them 
> explicit?  Seems like that's the exact sort of procedural thing puppet is 
> trying to get away from.  Right now the answer is that there's just too much 
> typing involved with specifying all of those dependencies, but with 
> first-class-relationships that wouldn't be the case.

do you also have 500 to 2000 rc scripts and have to manage dependencies in them 
all with launchd? do your bootup also happen in a random order? do you have 
different sets - lets say 30% to 50% difference between nodes in your rc 
scripts? does your rc script run in one monolithic process that doesnt do 
capability checks at each stage of your life cycle? 

puppet has:

 * 100s to 1000s of resources per node all needing dependencies or hints
 * they often change massively from node to node, i have nodes where I can say 
they differ 70 to 80% from other nodes wrt resources on them
 * puppet determines capabilities upfront before doing anything in your run and 
doesnt refresh that capability map during a run, you cannot install cron 
package and make crontab entries in the same puppet run
 * if I did nothing re ordering, puppet will do runs totally randomly, this is 
a good thing I am happy with that
 * but if I wanted to install cron package first and then perhaps restart 
puppet, I would need to add 100s or 1000s of require/before/etc entries.  the 
require() function helps, but its broken. and would closely couple my manifests 
to my environment making it very hard to share modules.
 * and if i needed to also install some other package, I'd need to do a ton of 
edits again, they are error prone and sucky

If I had just a bootstrap class that will run first, I can avoid all this pain 
and let puppet dependencies/ordering be confined to resource level only in 
isolation of modules and have dependencies only between modules at a class 
level this makes the whole thing much more palatable.

The scale of the problem of having to add a lot of require/dependencies/etc to 
all resources is just massive, you cant compare it to something with only 20 
resources like your average rc system.

The matter of being able to share modules is significant too.  If I add 
requires everywhere for a class called 'bootstrap' and i want to share my code, 
then that will impact everyone running my shared code.  It causes a lot of 
close coupling thats just plain evil.  Compare with launchd its a pretty safe 
bet to say all $distro users will be happy with having a dependency called 
'networking' to hook into, that's not the case with puppet its a generic 
framework, for many uses, people and operating systems.

wrt sharing of code, if the 'do this first' ability was decoupled from the code 
I can use your code and do whatever I need to do first without having to adjust 
your code and add lots of explicit dependencies.  


----------------------------------------
Feature #2658: Add puppet "run stages"
http://projects.puppetlabs.com/issues/2658

Author: Robin Bowes
Status: Needs design decision
Priority: Normal
Assigned to: Luke Kanies
Category: 
Target version: 
Affected version: 0.25.0
Keywords: 
Branch: 


Sometimes, there are certain specific manifests that you want to run before all 
others.

Similarly, there may be others that you want to run after all others have 
finished.

I'd like to see support for this added to puppet.

By default, all manifests would be "run" in the "main" stage. However, all 
types would support an additional parameter: stage => 'pre' or stage => 'post.

Anything labelled as "pre" would be executed first, followed by anything 
labelled "main" or with no explicit stage, then finally anything labelled 
"post".

The stages could even be user-defined by specifying them in some config file, 
eg:

[stages]
default=main
1=pre
2=main
3=post

Any support for this sort of idea?


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to