John Warburton
2011-May-20 03:45 UTC
[Puppet Users] The quantum effect when loading classes
Can anyone comment / expand upon http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ I am experiencing a case which may be related. We have an ENC, and recently on our twice daily noop runs from cron, puppet has reported some servers aren''t in sync because they do not have a certain module/class (dns_server) even though they are not subscribed to the dns_server module in the ENC I can''t reproduce it from the command line (yay), so am stumped debugging the issue, however, our dns_server module is not standard, and is probably causing the screw up % cat modules/dns_server/manifests/init.pp import "*.pp" include dns_server % ls -l modules/dns_server/manifests total 56 -rw-r--r-- 1 warbjoh unxadmin 22296 Mar 15 18:38 dns_server.pp -rw-r--r-- 1 warbjoh unxadmin 489 Mar 15 18:38 init.pp I have modified the module by renaming dns_server.pp to init.pp and hence removing the "import *.pp" I am now waiting to see if that has fixed the issue, but if it has (I suspect it will), why and how does this happen? Thanks John -- 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.
Hi, You should include the version number with your questions so we can narrow down answers :) First thing I would do is grep through manifest and look for any calls to the classes in your module. Also the syntax looks a bit odd to me. No doubt works but it is not the way puppet recommends. I would put the class inside your init.pp (like you said you''ve done now). You can put some notifies in your module and see if you can get more debugging info. Apart from that I have nothing else to offer I''m afraid. Cheers, Den On 20/05/2011, at 13:45, John Warburton <jwarburton@gmail.com> wrote:> Can anyone comment / expand upon http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ > > I am experiencing a case which may be related. We have an ENC, and recently on our twice daily noop runs from cron, puppet has reported some servers aren''t in sync because they do not have a certain module/class (dns_server) even though they are not subscribed to the dns_server module in the ENC > > I can''t reproduce it from the command line (yay), so am stumped debugging the issue, however, our dns_server module is not standard, and is probably causing the screw up > > % cat modules/dns_server/manifests/init.pp > import "*.pp" > include dns_server > > % ls -l modules/dns_server/manifests > total 56 > -rw-r--r-- 1 warbjoh unxadmin 22296 Mar 15 18:38 dns_server.pp > -rw-r--r-- 1 warbjoh unxadmin 489 Mar 15 18:38 init.pp > > I have modified the module by renaming dns_server.pp to init.pp and hence removing the "import *.pp" > > I am now waiting to see if that has fixed the issue, but if it has (I suspect it will), why and how does this happen? > > Thanks > > John > -- > 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.-- 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
2011-May-20 15:22 UTC
Re: [Puppet Users] The quantum effect when loading classes
On Thu, May 19, 2011 at 8:45 PM, John Warburton <jwarburton@gmail.com>wrote:> Can anyone comment / expand upon > http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ > > I am experiencing a case which may be related. We have an ENC, and recently > on our twice daily noop runs from cron, puppet has reported some servers > aren''t in sync because they do not have a certain module/class (dns_server) > even though they are not subscribed to the dns_server module in the ENC > > I can''t reproduce it from the command line (yay), so am stumped debugging > the issue, however, our dns_server module is not standard, and is probably > causing the screw up > > % cat modules/dns_server/manifests/init.pp > import "*.pp" > include dns_server >You should avoid import in favor of include like this: # modules/dns_server/manifests/init.pp class dns_server { # actual contents of your dns_server class. } and then your ENC or site.pp just does "include dns_server".> % ls -l modules/dns_server/manifests > total 56 > -rw-r--r-- 1 warbjoh unxadmin 22296 Mar 15 18:38 dns_server.pp > -rw-r--r-- 1 warbjoh unxadmin 489 Mar 15 18:38 init.pp > > I have modified the module by renaming dns_server.pp to init.pp and hence > removing the "import *.pp" > > I am now waiting to see if that has fixed the issue, but if it has (I > suspect it will), why and how does this happen?> Thanks > > John > > -- > 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 Product, Puppet Labs @nigelkersten -- 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.
John Warburton
2011-May-23 01:26 UTC
Re: [Puppet Users] The quantum effect when loading classes
On 21 May 2011 01:22, Nigel Kersten <nigel@puppetlabs.com> wrote:> On Thu, May 19, 2011 at 8:45 PM, John Warburton <jwarburton@gmail.com>wrote: > >> Can anyone comment / expand upon >> http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ >> >> % cat modules/dns_server/manifests/init.pp >> import "*.pp" >> include dns_server >> > > You should avoid import in favor of include like this: > > # modules/dns_server/manifests/init.pp > class dns_server { > # actual contents of your dns_server class. > } > > and then your ENC or site.pp just does "include dns_server". > > That''s what I did below - it seems to have cleaned up the weird behaviour> >> % ls -l modules/dns_server/manifests >> total 56 >> -rw-r--r-- 1 warbjoh unxadmin 22296 Mar 15 18:38 dns_server.pp >> -rw-r--r-- 1 warbjoh unxadmin 489 Mar 15 18:38 init.pp >> >> I have modified the module by renaming dns_server.pp to init.pp and hence >> removing the "import *.pp" >> >>I was hoping anyone could comment on http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ Thanks John -- 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.
Hi, Bit hard to make any real comment on the blog because we don''t have a copy of the manifest (or test case), the version that exhibits the behavior or a log to show what is occurring. Nor has he(or she) filed a bug report to my knowledge. If I experienced that sort of behaviour that''s what I''d do. I''ve not seen that particular behaviour. Cheers, Den On 23/05/2011, at 11:26, John Warburton <jwarburton@gmail.com> wrote:> On 21 May 2011 01:22, Nigel Kersten <nigel@puppetlabs.com> wrote: > On Thu, May 19, 2011 at 8:45 PM, John Warburton <jwarburton@gmail.com> wrote: > Can anyone comment / expand upon http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ > > % cat modules/dns_server/manifests/init.pp > import "*.pp" > include dns_server > > You should avoid import in favor of include like this: > > # modules/dns_server/manifests/init.pp > class dns_server { > # actual contents of your dns_server class. > } > > and then your ENC or site.pp just does "include dns_server". > > That''s what I did below - it seems to have cleaned up the weird behaviour > > > % ls -l modules/dns_server/manifests > total 56 > -rw-r--r-- 1 warbjoh unxadmin 22296 Mar 15 18:38 dns_server.pp > -rw-r--r-- 1 warbjoh unxadmin 489 Mar 15 18:38 init.pp > > I have modified the module by renaming dns_server.pp to init.pp and hence removing the "import *.pp" > > > I was hoping anyone could comment on http://www.nico.schottelius.org/blog/puppet-sometimes-loads-a-class/ > > Thanks > > John > -- > 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.-- 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.
Reasonably Related Threads
- Checking and setting svc properties in Solaris
- Problem using the logadm pattern
- Anyone managed to integrate Ambari/Hortonworks with an existing puppet installation?
- ANNOUNCE: Puppet 2.6.3 - Release Candidate 1 available!
- How to include the Scope(...) in a generated string?