Al @ Lab42
2008-May-03 12:52 UTC
[Puppet Users] Handling "core" dependencies and requirements
A question for the experts & developers, is there a direct way to specify some resources that should be processed before all the others, without the need to specify them as requirements wherever needed? I explain better (hopefully), some resources, for example yum repo files, puppet.conf file, /etc/ resolv.conf, /etc/hosts and so on, might be or often are necessary for a smooth puppet run. It happens at times, when they are not well specified as requirements wherever needed, that at a first puppet run (I tend to do it right in kickstart phase) there are errors for missing repo file or similar stuff. These errors tend to be cleaned up with further puppet runs, when the required resources are installed. Now, I know that Require => is right for this, but I think it would be nice to have some sort of method to be sure to have a resource processed with maximum priority (eventually with a priority number) without the need to specify it as requirement wherver necessary. Is there a way to obtain this result with the current puppet code (excluding a more or less big bunch of require definitions) ? Is this a feature than might be interesting to have? Does anyone else find it useful? Best regards, Al --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Lindsay Holmwood
2008-May-04 02:00 UTC
[Puppet Users] Re: Handling "core" dependencies and requirements
On Sat, May 3, 2008 at 10:52 PM, Al @ Lab42 <lab42.it@gmail.com> wrote:> > I explain better (hopefully), > some resources, for example yum repo files, puppet.conf file, /etc/ > resolv.conf, /etc/hosts and so on, might be or often are necessary for > a smooth puppet run. > It happens at times, when they are not well specified as requirements > wherever needed, that at a first puppet run (I tend to do it right in > kickstart phase) there are errors for missing repo file or similar > stuff. These errors tend to be cleaned up with further puppet runs, > when the required resources are installed. > > Now, I know that Require => is right for this, but I think it would be > nice to have some sort of method to be sure to have a resource > processed with maximum priority (eventually with a priority number) > without the need to specify it as requirement wherver necessary.In the past i''ve dodged this by tagging important things in my manifests (such as yum and puppet), and then running puppet from kickstart with ''--tags yum,puppet''. When the machine comes back up all the important bits are configured and the puppetrun works. Lindsay -- http://slug.org.au/ (the Sydney Linux Users Group) http://holmwood.id.au/~lindsay/ (me) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Al @ Lab42
2008-May-04 13:50 UTC
[Puppet Users] Re: Handling "core" dependencies and requirements
On May 4, 4:00 am, "Lindsay Holmwood" <lind...@holmwood.id.au> wrote:> In the past i''ve dodged this by tagging important things in my > manifests (such as yum and puppet), and then running puppet from > kickstart with ''--tags yum,puppet''. > > When the machine comes back up all the important bits are configured > and the puppetrun works.Yeah, plain and good solution. Thanks, al --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2008-May-05 04:21 UTC
[Puppet Users] Re: Handling "core" dependencies and requirements
On May 3, 2008, at 7:52 AM, Al @ Lab42 wrote:> Now, I know that Require => is right for this, but I think it would be > nice to have some sort of method to be sure to have a resource > processed with maximum priority (eventually with a priority number) > without the need to specify it as requirement wherver necessary. > > Is there a way to obtain this result with the current puppet code > (excluding a more or less big bunch of require definitions) ? > Is this a feature than might be interesting to have? > Does anyone else find it useful?I''ve considered a feature like this, but I haven''t come up with a good way to do it. In looking at the topsort method in simple_graph.rb, it looks possible that you could add a ''priority'' attribute, and then sort all resources at a given level in the iteration based on that priority, such that resources that were equivalent in the dependency graph were sorted according to a second factor. If anyone wants to give this a try, and it works, I''d definitely accept that patch. -- He is indebted to his memory for his jests and to his imagination for his facts. --Richard Brinsley Sheridan --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---