I''m new to puppet, and just managed to get my puppet master working, and creating files. Now I want to begin to build software ''stacks'' that work across multiple distros. But my limited understanding of puppet, is that a client will download all its instructions at once, and the execute then, can I assume that they will be executed in the order they appear in site.pp ? -- Sent from my mobile device -- 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.
On Apr 18, 2010, at 1:44 AM, Mr Gabriel wrote:> I''m new to puppet, and just managed to get my puppet master working, > and creating files. > > Now I want to begin to build software ''stacks'' that work across > multiple distros. > > But my limited understanding of puppet, is that a client will download > all its instructions at once, and the execute then, can I assume that > they will be executed in the order they appear in site.pp ? >In a word, no. I don''t have time for a complete answer, but you can find it at http://groups.google.com/group/puppet-users/browse_thread/thread/60413b96a3bd3843/fbe7aafe140a0b0b?hl=en&lnk=gst -Patrick -- 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.
Daniel Pittman
2010-Apr-18 08:57 UTC
Re: [Puppet Users] Can I specify the order classes are run?
Mr Gabriel <angelisonline@gmail.com> writes:> I''m new to puppet, and just managed to get my puppet master working, and > creating files. Now I want to begin to build software ''stacks'' that work > across multiple distros. > > But my limited understanding of puppet, is that a client will download > all its instructions at once, and the execute then, can I assume that > they will be executed in the order they appear in site.pp ?No. You can assume that puppet will specifically *NOT* do that. Puppet has an internal dependency system that it uses to apply a partial ordering to the entire set of things it has to do. So, anything that you specify an explicit dependency for, or that has an implicit dependency[1], you are guaranteed that puppet will do them in the order you specify — or will fail if there is no order that works. For everything else you can assume that the order is absolutely, completely, totally random, and that the random order *changes* every single run. Regards, Daniel Footnotes: [1] Some actions, like creating a file, can implicitly depend on their parent instances without you saying anything. -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- 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.
Mr Gabriel
2010-Apr-18 19:03 UTC
[Puppet Users] Re: Can I specify the order classes are run?
Thank you for your answer, I thought this was the case, I coudn''t see any mechanism to control the order. Is is true enough to say that eventually, everything will run? On 18/04/2010, Daniel Pittman <daniel@rimspace.net> wrote:> Mr Gabriel <angelisonline@gmail.com> writes: > >> I''m new to puppet, and just managed to get my puppet master working, and >> creating files. Now I want to begin to build software ''stacks'' that work >> across multiple distros. >> >> But my limited understanding of puppet, is that a client will download >> all its instructions at once, and the execute then, can I assume that >> they will be executed in the order they appear in site.pp ? > > No. You can assume that puppet will specifically *NOT* do that. > > Puppet has an internal dependency system that it uses to apply a partial > ordering to the entire set of things it has to do. > > So, anything that you specify an explicit dependency for, or that has an > implicit dependency[1], you are guaranteed that puppet will do them in the > order you specify — or will fail if there is no order that works. > > For everything else you can assume that the order is absolutely, completely, > totally random, and that the random order *changes* every single run. > > Regards, > Daniel > > Footnotes: > [1] Some actions, like creating a file, can implicitly depend on their > parent > instances without you saying anything. > > -- > ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 > 707 > ♽ made with 100 percent post-consumer electrons > > -- > 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. > >-- Sent from my mobile device -- 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.
Peter Meier
2010-Apr-18 19:08 UTC
Re: [Puppet Users] Re: Can I specify the order classes are run?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1> Is is true enough to say that eventually, everything will run?One simple rule: if order matters, specify and hence document it, otherwise everything will run. cheers pete -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvLWKoACgkQbwltcAfKi3/sqwCfVVYV6MzdIMcDgAST252JHIDM /PcAn28R+Pn6LFkp7y5Hx0D5VnyFDz7k =a8U1 -----END PGP SIGNATURE----- -- 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.
Paul Lathrop
2010-Apr-18 19:15 UTC
Re: [Puppet Users] Re: Can I specify the order classes are run?
On Sun, Apr 18, 2010 at 12:03 PM, Mr Gabriel <angelisonline@gmail.com> wrote:> Thank you for your answer, I thought this was the case, I coudn''t see > any mechanism to control the order.There specifically IS a mechanism to control ordering. ''before'', ''require'', ''subscribe'', and ''notify'' are metaparameters which specify ordering explicitly. One of the ways that people find they need to adjust their thinking when using Puppet is to adjust to the idea that you need to explicitly specify your dependencies. This is a feature, not a bug.> Is is true enough to say that eventually, everything will run?As long as there are no persistent errors, you can usually depend on multiple runs of puppet eventually bringing your system into sync with your expectations. It''s generally considered a best practice to spend a little time trying to get your manifests to work in as few runs as feasible. --Paul -- 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.
Daniel Pittman
2010-Apr-19 00:29 UTC
Re: [Puppet Users] Re: Can I specify the order classes are run?
Paul Lathrop <paul.lathrop@gmail.com> writes:> On Sun, Apr 18, 2010 at 12:03 PM, Mr Gabriel <angelisonline@gmail.com> wrote: > >> Thank you for your answer, I thought this was the case, I coudn''t see >> any mechanism to control the order. > > There specifically IS a mechanism to control ordering. ''before'', > ''require'', ''subscribe'', and ''notify'' are metaparameters which specify > ordering explicitly....but they were traditionally hard to locate, so I have some sympathy for Mr Gabriel having trouble with that. This may have improved in the newer documentation now it moved to puppetlabs, though, since I have not rechecked.> One of the ways that people find they need to adjust their thinking when > using Puppet is to adjust to the idea that you need to explicitly specify > your dependencies. This is a feature, not a bug.In fairness, people are used to the idea they need to explicitly specify their dependencies — just that the mechanism for that is careful ordering of your source files, not a meta-dependency system.>> Is is true enough to say that eventually, everything will run? > > As long as there are no persistent errors, you can usually depend on > multiple runs of puppet eventually bringing your system into sync with > your expectations. It''s generally considered a best practice to spend > a little time trying to get your manifests to work in as few runs as > feasible.I would have just said "yes". :) Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- 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.