Nico -telmich- Schottelius
2009-Sep-28 08:13 UTC
[Puppet Users] puppet / works & does not work: the quantum effect
Good morning dear puppet users, if you experience "it works - it does not work" situations with puppet like I do, here may be the reason for it: http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ I was told that this behaviour is "correct" on IRC, but I don''t agree with it: a configuration should either work or not, not both. What''s your point of view? Is my approach not the way puppet users/devs think or do you also see this as a bug? Sincerly, Nico -- Currently moving *.schottelius.org to http://www.nico.schottelius.org/ ... PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C
James Turnbull
2009-Sep-28 18:41 UTC
[Puppet Users] Re: puppet / works & does not work: the quantum effect
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nico -telmich- Schottelius wrote:> Good morning dear puppet users, > > if you experience "it works - it does not work" situations with puppet > like I do, here may be the reason for it: > > http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ > > I was told that this behaviour is "correct" on IRC, but I don''t agree > with it: a configuration should either work or not, not both. > > What''s your point of view? > Is my approach not the way puppet users/devs think or do you also see > this as a bug?- From reading your blog post I am not sure that behaviour/explanation is exactly correct but the best approach would be to log a ticket please. Thanks James Turnbull - -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSsEDbCFa/lDkFHAyAQJi6Af/Qc+A5bJf9yA5mf1TfMBHEj7NmesvK+T4 pQP00ypWEACvl4rLPP27n8clEUfjtCLtYlNrAj4Es4fLPeSVaDrFnxTbYL821gDs bH8lXCwJjwQYDbXjd8+BphQ1Y8VBt3rCGajO0tLUj9MLd7TNHbyqkKb9M+bFP1JH xy3GvVDZtV1gHVR8qMzqWTg/TmJZq8rWEyk6oJSJ2qwan2Zs/zSCYVjDaSN+Kkhn 3zEAZqX5QZ8OKS1KiHswljRZ5fWa87YYv2fNTaUcUZxm/auYeDZEUVYPiJe++OKA 0D4agiShQE4hXueUYoz32v7kbmv1W0V0nM0ra0J5662qSdZR7E7R7A==tY3y -----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 -~----------~----~----~----~------~----~------~--~---
Trevor Vaughan
2009-Sep-29 11:15 UTC
[Puppet Users] Re: puppet / works & does not work: the quantum effect
Nico, I''ve seen this behavior in the past and it generally has to do with a typo or misconfiguration on my part. Whenever I run across this, I restart the puppetmaster and then try again. At that point, you should never have it work until you fix the problem. Generally, after any major change, I restart my test puppetmaster anyway just to make sure I didn''t do something stupid (missing permissions, whatever). If the test puppetmaster works properly, then it should translate to production with few issues. Trevor On Mon, Sep 28, 2009 at 04:13, Nico -telmich- Schottelius <nico-puppet-users@schottelius.org> wrote:> Good morning dear puppet users, > > if you experience "it works - it does not work" situations with puppet > like I do, here may be the reason for it: > > http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ > > I was told that this behaviour is "correct" on IRC, but I don''t agree > with it: a configuration should either work or not, not both. > > What''s your point of view? > Is my approach not the way puppet users/devs think or do you also see > this as a bug? > > Sincerly, > > Nico > > -- > Currently moving *.schottelius.org to http://www.nico.schottelius.org/ ... > > PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkrAcBkACgkQuL75KpiFGIwSngCfTXT/2V+B3MRI4xJB1t6xnMo8 > QFEAoNhYsbbKieB8OpCT3n0PME4HyuFR > =0+k/ > -----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 -~----------~----~----~----~------~----~------~--~---
Peter Meier
2009-Sep-29 12:28 UTC
[Puppet Users] Re: puppet / works & does not work: the quantum effect
nasty side effect from running multiple nodes against the same thread. If you would run only the wrong manifest against a certain puppetmasterd thread it would always fail (like trevor suggested the restart). If puppet would unload all already loaded classes everytime a new compile request comes in, people would complain puppet being slow(er). So either cache loaded classes and have such nasty side effects. To be sure that your manifest will always work, simply run it against a very own puppetmasterd instance. Or have a slow(er) puppetmasterd without any caching at all. -> no "feature" yet. Or design by convention and never put more than one class/define into a file and extensively use puppet''s autoloading feature right. ;) cheers peter --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Allan Marcus
2009-Sep-29 15:23 UTC
[Puppet Users] Re: puppet / works & does not work: the quantum effect
I''m noticed a similar odd behavior with 0.25.1 as well. I have a module that works fine under 0.24.8 (both webrick and passenger), works fine under 0.25.1 (webrick), but will not load for the first few runs under 0.25.1 (passenger). I only have one node, so I''m pretty sure it''s not a caching issue, or if it is, it''s odd. For the first few runs of the node I see the following in the log: <Error>: Could not parse for environment production: No file(s) found for import of ''lanl-baseline'' at /var/puppet/environments/production/ manifests/site.pp:19 So here''s the chain. If you can see where the problem is, please let me know. /var/puppet/environments/production/manifests/site.pp: import "lanl-baseline" /var/puppet/environments/production/modules/lanl-baseline/manifests/ init.pp: import "nodes.pp" import "definitions/*" import "classes/*" /var/puppet/environments/production/modules/lanl-baseline/manifests/ nodes.pp: node basenode { case $operatingsystem { darwin: { include darwin } default: { include darwin } } } # the default node. All non OS classes should inherit this node default inherits basenode {} /var/puppet/environments/production/modules/lanl-baseline/manifests/ classes/darwin.pp class darwin { include puppet include stom include getDefsDate include swInventory include sav } each of the classes included in darwin.pp have corresponding ".pp" class files in same "classes" dir. So after two or three client runs I no longer get the error about lanl- baseline and the catalog is built and run. Do I need to change my dir structure: puppet-dev:production root# pwd /var/puppet/environments/production puppet-dev:production root# tree . |-manifests |-modules |---lanl-baseline |-----files |-----manifests |-------classes |-------definitions |-templates puppet.conf: [main] manifest = /var/puppet/environments/production/manifests/site.pp modulepath = /var/puppet/environments/production/modules templatedir = /var/puppet/environments/production/templates --- Thanks, Allan Marcus 505-667-5666 On Sep 28, 2009, at 2:13 AM, Nico -telmich- Schottelius wrote:> Good morning dear puppet users, > > if you experience "it works - it does not work" situations with puppet > like I do, here may be the reason for it: > > http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ > > I was told that this behaviour is "correct" on IRC, but I don''t agree > with it: a configuration should either work or not, not both. > > What''s your point of view? > Is my approach not the way puppet users/devs think or do you also see > this as a bug? > > Sincerly, > > Nico > > -- > Currently moving *.schottelius.org to http:// > www.nico.schottelius.org/ ... > > PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Trevor Vaughan
2009-Sep-29 15:57 UTC
[Puppet Users] Re: puppet / works & does not work: the quantum effect
Peter, Thanks for the explanation. I hadn''t realized that I was abusing the crap out of the autoloader but, now that you explain it, I am! Trevor On Tue, Sep 29, 2009 at 08:28, Peter Meier <peter.meier@immerda.ch> wrote:> > nasty side effect from running multiple nodes against the same thread. > If you would run only the wrong manifest against a certain > puppetmasterd thread it would always fail (like trevor suggested the > restart). If puppet would unload all already loaded classes everytime > a new compile request comes in, people would complain puppet being > slow(er). > > So either cache loaded classes and have such nasty side effects. To be > sure that your manifest will always work, simply run it against a very > own puppetmasterd instance. > > Or have a slow(er) puppetmasterd without any caching at all. -> no > "feature" yet. > > Or design by convention and never put more than one class/define into > a file and extensively use puppet''s autoloading feature right. ;) > > cheers peter > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Nigel Kersten
2009-Sep-29 16:00 UTC
[Puppet Users] Re: puppet / works & does not work: the quantum effect
On Tue, Sep 29, 2009 at 5:28 AM, Peter Meier <peter.meier@immerda.ch> wrote:> Or design by convention and never put more than one class/define into > a file and extensively use puppet''s autoloading feature right. ;)That''s the approach I''ve always taken, and I haven''t run into any of these class of problems so far. -- nigel --~--~---------~--~----~------------~-------~--~----~ 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
2009-Oct-03 10:52 UTC
[Puppet Users] Re: puppet / works & does not work: the quantum effect
Hi> /var/puppet/environments/production/modules/lanl-baseline/manifests/ > classes/darwin.pp > class darwin { > include puppet > include stom > include getDefsDate > include swInventory > include sav > } > > each of the classes included in darwin.pp have corresponding ".pp" > class files in same "classes" dir. > > So after two or three client runs I no longer get the error about lanl- > baseline and the catalog is built and run. > > Do I need to change my dir structure: > > puppet-dev:production root# pwd > /var/puppet/environments/production > puppet-dev:production root# tree . > |-manifests > |-modules > |---lanl-baseline > |-----files > |-----manifests > |-------classes > |-------definitions > |-templates >not that I''m sure this is related to your problem. Try to get rid off import statements and organise your .pp according to their names, so puppet find them via autoloading. I don''t see any reason to distinguish between classes and definitions and put them into different folders. Means if you have a class lanl-baseline::foobar it comes into lanl-baseline/manifests/foobar.pp cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---