Issue #2658 has been updated by Luke Kanies.
Ok, I'm trying to implement this to see how easy it really is or isn't. The main thing is, um, main. This is, if we do this using the simple milestone concept, then we need to pin everything between the milestones. E.g., in the pre/main/post setup, we've got two milestones: 'pre' and 'post'. This doesn't work because if a resource requires 'post' then it could happen in pre or main, and there's actually quite a bit of logic required around how many milestones there are and how many edges are necessary in the graph. I don't think it's possible to solve this in anything other than a fantastically complicated way using dependencies. However, I can see solving this with completely different graphs. I'm going to take a crack at that. Basically, every stage will be a completely disconnected graph in the catalog - we already have a 'main' (currently treated as a 'class', but I'll be changing it to a 'stage'), so every stage you create just makes a new graph head, and specifying that a given class is in a given stage just moves it across to that graph. It gets a bit complicated when you talk about classes vs. resources, though. Do you really want to be able to willy-nilly move any resource into a stage, or do you want to restrict it at the class/definition/etc level? It seems to me it should be a container-level restriction - only classes should support stages, not normal resources. Is this too restrictive? Anyway, I'll come up with the simplest solution I can and we'll see what happens. ---------------------------------------- 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.
