Peter Berghold
2011-Nov-25 19:59 UTC
[Puppet Users] cannot find a module in plain sight...
I have this module with the following structure. adminscripts ├── facter ├── files │ └── getVPSNodes.pl ├── lib │ └── puppet │ ├── parser │ ├── provider │ └── type ├── manifests │ ├── classes │ ├── defines │ ├── getvpsnodes.pp │ └── init.pp └── templates The file getvpsnodes.pp looks like: class adminscripts::getvpsnodes{ @file { get-vps-nodes-script: path => "/usr/local/sbin/getVPSNodes.pl", source => "puppet://puppet/syscripts/getVPSNodes.pl", owner => root, group => root, mode => 0700 , require => [File[usr-local-sbin-dir]] } realize File[get-vps-nodes-script] @cron { run-get-vps-nodes-daily: hour => 1, command => "/usr/local/sbin/getVPSNodes.pl 2>&1 > /dev/null", user => "puppet", require => [File[get-vps-nodes-script]] } realize Cron[run-get-vps-nodes-daily] } and in one of my node definitions I have this: node "slccrepos0.slc.sharkrivertech.com" { include stddirs include adminscripts::getvpsnodes } and I''m seeing this: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class adminscripts::getvpsnodes for slccrepos0.slc.sharkrivertech.com at /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node slccrepos0.slc.sharkrivertech.com warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run I know it has to be me... what am I missing here? -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- 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-Nov-25 20:32 UTC
Re: [Puppet Users] cannot find a module in plain sight...
On Fri, Nov 25, 2011 at 11:59 AM, Peter Berghold <salty.cowdawg@gmail.com>wrote:> > > I have this module with the following structure. > > adminscripts > ├── facter > ├── files > │ └── getVPSNodes.pl > ├── lib > │ └── puppet > │ ├── parser > │ ├── provider > │ └── type > ├── manifests > │ ├── classes > │ ├── defines > │ ├── getvpsnodes.pp > │ └── init.pp > └── templates > > > > The file getvpsnodes.pp looks like: > > > class adminscripts::getvpsnodes{ > @file { get-vps-nodes-script: > path => "/usr/local/sbin/getVPSNodes.pl", > source => "puppet://puppet/syscripts/getVPSNodes.pl", > owner => root, group => root, mode => 0700 , > require => [File[usr-local-sbin-dir]] > > > } > > realize File[get-vps-nodes-script] > > @cron { > run-get-vps-nodes-daily: > hour => 1, > command => "/usr/local/sbin/getVPSNodes.pl 2>&1 > /dev/null", > user => "puppet", > require => [File[get-vps-nodes-script]] > } > > realize Cron[run-get-vps-nodes-daily] > > } > > > and in one of my node definitions I have this: > > node "slccrepos0.slc.sharkrivertech.com" { > include stddirs > > include adminscripts::getvpsnodes > > } > > and I''m seeing this: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not find class adminscripts::getvpsnodes for > slccrepos0.slc.sharkrivertech.com at > /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node > slccrepos0.slc.sharkrivertech.com > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > > > I know it has to be me... what am I missing here? >As an aside, this was an awesome way to post a module autoload problem Peter, showing the filesystem layout and the manifest content. Do you perhaps have another adminscripts/manifests/init.pp somewhere else in your modulepath? Or is there a "class adminscripts { ... }" defined somewhere else that''s been picked up by a non-autloaded filesystem layout? Is this the only version of the adminscripts::getvpsnodes class that exists in any of your modulepath components? Anything unusual about the adminscripts/manifests/init.pp in this specific module? This doesn''t look related, but I''m curious about: source => "puppet://puppet/syscripts/getVPSNodes.pl", when it looks like you''re also delivering it as: puppet:///modules/adminscripts/getVPSNodes.pl in this specific module. -- Nigel Kersten Product Manager, Puppet Labs -- 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, The following will fail wont it? The source path is wrong. source => "puppet://puppet/syscripts/getVPSNodes.pl", I can''t check the class myself but do the .pp files parse correctly? Use the --parseonly or the validate command to check. It maybe failing to parse one of the files. Cheers, Den On 26/11/2011, at 6:59, Peter Berghold <salty.cowdawg@gmail.com> wrote:> > > I have this module with the following structure. > > adminscripts > ├── facter > ├── files > │ └── getVPSNodes.pl > ├── lib > │ └── puppet > │ ├── parser > │ ├── provider > │ └── type > ├── manifests > │ ├── classes > │ ├── defines > │ ├── getvpsnodes.pp > │ └── init.pp > └── templates > > > > The file getvpsnodes.pp looks like: > > > class adminscripts::getvpsnodes{ > @file { get-vps-nodes-script: > path => "/usr/local/sbin/getVPSNodes.pl",source => "puppet://puppet/syscripts/getVPSNodes.pl",> owner => root, group => root, mode => 0700 , > require => [File[usr-local-sbin-dir]] > > > } > > realize File[get-vps-nodes-script] > > @cron { > run-get-vps-nodes-daily: > hour => 1, > command => "/usr/local/sbin/getVPSNodes.pl 2>&1 > /dev/null", > user => "puppet", > require => [File[get-vps-nodes-script]] > } > > realize Cron[run-get-vps-nodes-daily] > > } > > > and in one of my node definitions I have this: > > node "slccrepos0.slc.sharkrivertech.com" { > include stddirs > > include adminscripts::getvpsnodes > > } > > and I''m seeing this: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class adminscripts::getvpsnodes for slccrepos0.slc.sharkrivertech.com at /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node slccrepos0.slc.sharkrivertech.com > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > > > I know it has to be me... what am I missing here? > > > -- > Peter L. Berghold > Owner, Shark River Technical Solutions LLC > -- > 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.
Peter Berghold
2011-Nov-25 20:46 UTC
Re: [Puppet Users] cannot find a module in plain sight...
On Fri, Nov 25, 2011 at 3:32 PM, Nigel Kersten <nigel@puppetlabs.com> wrote:> > As an aside, this was an awesome way to post a module autoload problem > Peter, showing the filesystem layout and the manifest content. > >the "tree" command is a beautiful thing! :-D Do you perhaps have another adminscripts/manifests/init.pp somewhere else> in your modulepath? > > Nope. only one of it''s kind. In fact it was originally named"sysscripts/..." and I moved it from that name to adminscripts. When it was named sysscripts I got the same error and renaming it was part of my plan to figure out why.> Or is there a "class adminscripts { ... }" defined somewhere else that''s > been picked up by a non-autloaded filesystem layout? > > Is this the only version of the adminscripts::getvpsnodes class that > exists in any of your modulepath components? > >This is the only version.> Anything unusual about the adminscripts/manifests/init.pp in this specific > module? > > Here''s init.pp:import "*.pp" import "*.pp" class adminscripts { case $operatingsystem { default : { } } }> This doesn''t look related, but I''m curious about: > > source => "puppet://puppet/syscripts/getVPSNodes.pl", > >OK.... just fixed that. I forgot to edit the source when I moved the module to its new name.> when it looks like you''re also delivering it as: >My modules stay pretty consistent because I use a script to lay them out and check them into SVN. In fact I never edit the modules directly on the puppet server, but rather modify them on a laptop, check them into SVN and have cron check out the new versions as they become available. -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- 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.
R.I.Pienaar
2011-Nov-25 20:49 UTC
Re: [Puppet Users] cannot find a module in plain sight...
----- Original Message -----> > > As an aside, this was an awesome way to post a module autoload > problem Peter, showing the filesystem layout and the manifest > content. > > > > the "tree" command is a beautiful thing! :-Dseconded, good information up front makes it all easier. I couldn''t spot an obvious problem either. You try restarting your master and then checking the logs immediately following when the first node that needs this module checks in. When there are syntax errors the master will log them once and then complain about missing classes - not sure if thats still the behavior in 2.7 but that used to be the way and can be quite confusing. -- 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 Berghold
2011-Nov-25 20:51 UTC
Re: [Puppet Users] cannot find a module in plain sight...
ran and got: puppet --debug -v --parseonly init.pp debug: importing ''/home/peter/src2/puppet-cfg/modules/adminscripts/manifests/getvpsnodes.pp'' debug: importing ''/home/peter/src2/puppet-cfg/modules/adminscripts/manifests/init.pp'' On Fri, Nov 25, 2011 at 3:45 PM, Denmat <tu2bgone@gmail.com> wrote:> Hi, > > The following will fail wont it? The source path is wrong. > > source => "puppet://puppet/syscripts/getVPSNodes.pl", > > I can''t check the class myself but do the .pp files parse correctly? Use > the --parseonly or the validate command to check. It maybe failing to parse > one of the files. > > Cheers, > Den > On 26/11/2011, at 6:59, Peter Berghold <salty.cowdawg@gmail.com> wrote: > > > > I have this module with the following structure. > > adminscripts > ├── facter > ├── files > │ └── getVPSNodes.pl > ├── lib > │ └── puppet > │ ├── parser > │ ├── provider > │ └── type > ├── manifests > │ ├── classes > │ ├── defines > │ ├── getvpsnodes.pp > │ └── init.pp > └── templates > > > > The file getvpsnodes.pp looks like: > > > class adminscripts::getvpsnodes{ > @file { get-vps-nodes-script: > path => "/usr/local/sbin/getVPSNodes.pl", > > source => "puppet://puppet/syscripts/getVPSNodes.pl", > > owner => root, group => root, mode => 0700 , > require => [File[usr-local-sbin-dir]] > > > } > > realize File[get-vps-nodes-script] > > @cron { > run-get-vps-nodes-daily: > hour => 1, > command => "/usr/local/sbin/getVPSNodes.pl 2>&1 > /dev/null", > user => "puppet", > require => [File[get-vps-nodes-script]] > } > > realize Cron[run-get-vps-nodes-daily] > > } > > > and in one of my node definitions I have this: > > node "slccrepos0.slc.sharkrivertech.com" { > include stddirs > > include adminscripts::getvpsnodes > > } > > and I''m seeing this: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not find class adminscripts::getvpsnodes for > slccrepos0.slc.sharkrivertech.com at > /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node > slccrepos0.slc.sharkrivertech.com > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > > > I know it has to be me... what am I missing here? > > > -- > Peter L. Berghold > Owner, Shark River Technical Solutions LLC > > -- > 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. >-- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- 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 Berghold
2011-Nov-25 21:05 UTC
Re: [Puppet Users] cannot find a module in plain sight...
OK: ran the master in verbose debug mode and the behavior changed. (!) Seems the real problem was some stuff in the earlier stages (just updated my puppet master the other day) was and the messages were masking the problem. I had some statements in my templates.pp file such as class { trusted-keys::root : stage => ''preamble'' } changed them to look like: class { ''trusted-keys::root'' : stage => ''preamble'' } and things started to work correctly (with minor changes.) Thanks all. puppet --debug -v --parseonly init.pp> debug: importing > ''/home/peter/src2/puppet-cfg/modules/adminscripts/manifests/getvpsnodes.pp'' > debug: importing > ''/home/peter/src2/puppet-cfg/modules/adminscripts/manifests/init.pp'' > > > > On Fri, Nov 25, 2011 at 3:45 PM, Denmat <tu2bgone@gmail.com> wrote: > >> Hi, >> >> The following will fail wont it? The source path is wrong. >> >> source => "puppet://puppet/syscripts/getVPSNodes.pl", >> >> I can''t check the class myself but do the .pp files parse correctly? Use >> the --parseonly or the validate command to check. It maybe failing to parse >> one of the files. >> >> Cheers, >> Den >> On 26/11/2011, at 6:59, Peter Berghold <salty.cowdawg@gmail.com> wrote: >> >> >> >> I have this module with the following structure. >> >> adminscripts >> ├── facter >> ├── files >> │ └── getVPSNodes.pl >> ├── lib >> │ └── puppet >> │ ├── parser >> │ ├── provider >> │ └── type >> ├── manifests >> │ ├── classes >> │ ├── defines >> │ ├── getvpsnodes.pp >> │ └── init.pp >> └── templates >> >> >> >> The file getvpsnodes.pp looks like: >> >> >> class adminscripts::getvpsnodes{ >> @file { get-vps-nodes-script: >> path => "/usr/local/sbin/getVPSNodes.pl", >> >> source => "puppet://puppet/syscripts/getVPSNodes.pl", >> >> owner => root, group => root, mode => 0700 , >> require => [File[usr-local-sbin-dir]] >> >> >> } >> >> realize File[get-vps-nodes-script] >> >> @cron { >> run-get-vps-nodes-daily: >> hour => 1, >> command => "/usr/local/sbin/getVPSNodes.pl 2>&1 > /dev/null", >> user => "puppet", >> require => [File[get-vps-nodes-script]] >> } >> >> realize Cron[run-get-vps-nodes-daily] >> >> } >> >> >> and in one of my node definitions I have this: >> >> node "slccrepos0.slc.sharkrivertech.com" { >> include stddirs >> >> include adminscripts::getvpsnodes >> >> } >> >> and I''m seeing this: >> >> err: Could not retrieve catalog from remote server: Error 400 on SERVER: >> Could not find class adminscripts::getvpsnodes for >> slccrepos0.slc.sharkrivertech.com at >> /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node >> slccrepos0.slc.sharkrivertech.com >> warning: Not using cache on failed catalog >> err: Could not retrieve catalog; skipping run >> >> >> I know it has to be me... what am I missing here? >> >> >> -- >> Peter L. Berghold >> Owner, Shark River Technical Solutions LLC >> >> -- >> 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. >> > > > > -- > Peter L. Berghold > Owner, Shark River Technical Solutions LLC >-- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- 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 Berghold
2011-Nov-25 21:14 UTC
Re: [Puppet Users] cannot find a module in plain sight...
I take that back. Seems I was running the wrong master. Started running the proper master and the problem is back: Here is what I''m seeing in the logged output: debug: importing ''/etc/puppet/modules/adminscripts/manifests/init.pp'' in environment production debug: importing ''/etc/puppet/modules/adminscripts/manifests/getvpsnodes.pp'' in environment production err: Could not find class adminscripts::getvpsnodes for slccrepos0.slc.sharkrivertech.com at /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node slccrepos0.slc.sharkrivertech.com err: Could not find class adminscripts::getvpsnodes for slccrepos0.slc.sharkrivertech.com at /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node slccrepos0.slc.sharkrivertech.com this is getting wierd... -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- 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-Nov-25 22:03 UTC
Re: [Puppet Users] cannot find a module in plain sight...
On Fri, Nov 25, 2011 at 12:46 PM, Peter Berghold <salty.cowdawg@gmail.com>wrote:> > > On Fri, Nov 25, 2011 at 3:32 PM, Nigel Kersten <nigel@puppetlabs.com>wrote: > > >> >> As an aside, this was an awesome way to post a module autoload problem >> Peter, showing the filesystem layout and the manifest content. >> >> > the "tree" command is a beautiful thing! :-D > > > Do you perhaps have another adminscripts/manifests/init.pp somewhere else >> in your modulepath? >> >> Nope. only one of it''s kind. In fact it was originally named > "sysscripts/..." and I moved it from that name to adminscripts. When it > was named sysscripts I got the same error and renaming it was part of my > plan to figure out why. > > >> Or is there a "class adminscripts { ... }" defined somewhere else that''s >> been picked up by a non-autloaded filesystem layout? >> >> Is this the only version of the adminscripts::getvpsnodes class that >> exists in any of your modulepath components? >> >> > This is the only version. > > >> Anything unusual about the adminscripts/manifests/init.pp in this >> specific module? >> >> Here''s init.pp: > > > import "*.pp" > > import "*.pp" > > class adminscripts { > case $operatingsystem { > default : { } > } > } >So you really should be able to avoid *all* use of "import" with modules laid out correctly as you''re doing here. It''s possible you''ve hit a recent bug we unintentionally introduced with import. http://projects.puppetlabs.com/issues/8433 It should be a reasonably mechanical transformation to move your classes to just follow the autloader structure and check if that resolves the situation? e.g. class foo { ... } -> modulepath/foo/manifests/init.pp class foo::bar { ... } -> modulepath/foo/manifests/bar.pp and then you should be able to remove all the import *.pp statements. There''s been a bit of grief expressed over this bug, so I''d like to reiterate that this wasn''t a deliberate deprecation, even though moving to the autoloader and removing ''import'' is definitely the way forward. My modules stay pretty consistent because I use a script to lay them out> and check them into SVN. In fact I never edit the modules directly on the > puppet server, but rather modify them on a laptop, check them into SVN and > have cron check out the new versions as they become available. >as you should :) -- 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 Berghold
2011-Nov-26 00:17 UTC
Re: [Puppet Users] cannot find a module in plain sight...
class foo { ... } -> modulepath/foo/manifests/init.pp> class foo::bar { ... } -> modulepath/foo/manifests/bar.pp > > and then you should be able to remove all the import *.pp statements. > > There''s been a bit of grief expressed over this bug, so I''d like to > reiterate that this wasn''t a deliberate deprecation, even though moving to > the autoloader and removing ''import'' is definitely the way forward. > > >>Sounds like I should change my module layout generation script as well. That''s cool. Fixed the issue I was running into as well. -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- 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 Nov 25, 2011, at 11:59 AM, Peter Berghold wrote:> err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class adminscripts::getvpsnodes for slccrepos0.slc.sharkrivertech.com at /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node slccrepos0.slc.sharkrivertech.com > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > > I know it has to be me... what am I missing here?It doesn''t mean it''s not there -- seems to often mean there''s a problem in the module. I''ve come to learn that this error means "there is something wrong when parsing your module" and you have to go look blindly to figure it out. This is somewhere that puppetlabs could improve things greatly. -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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-Nov-27 15:28 UTC
Re: [Puppet Users] cannot find a module in plain sight...
On Sat, Nov 26, 2011 at 7:25 PM, Jo Rhett <jrhett@netconsonance.com> wrote:> On Nov 25, 2011, at 11:59 AM, Peter Berghold wrote: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not find class adminscripts::getvpsnodes for > slccrepos0.slc.sharkrivertech.com at > /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node > slccrepos0.slc.sharkrivertech.com > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > > I know it has to be me... what am I missing here? > > > It doesn''t mean it''s not there -- seems to often mean there''s a problem in > the module. I''ve come to learn that this error means "there is something > wrong when parsing your module" and you have to go look blindly to figure > it out. This is somewhere that puppetlabs could improve things greatly. >If there''s a parse error in the manifests, that will be shown, but only each time Puppet re-parses them. If the module doesn''t parse, then it is effectively "not there" from Puppet''s point of view. Constructive suggestions on improving error reporting are always appreciated. http://projects.puppetlabs.com/projects/puppet/issues/new If you''re definitely seeing modules fail to parse, with no errors being thrown, and then the class subsequently can''t be found, please bug report, as that''s definitely a bug. You shouldn''t be completely "blind" here. -- Nigel Kersten Product Manager, Puppet Labs -- 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 Sat, Nov 26, 2011 at 7:25 PM, Jo Rhett <jrhett@netconsonance.com> wrote: > On Nov 25, 2011, at 11:59 AM, Peter Berghold wrote: >> err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class adminscripts::getvpsnodes for slccrepos0.slc.sharkrivertech.com at /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node slccrepos0.slc.sharkrivertech.com >> warning: Not using cache on failed catalog >> err: Could not retrieve catalog; skipping run >> >> I know it has to be me... what am I missing here? > > > It doesn''t mean it''s not there -- seems to often mean there''s a problem in the module. I''ve come to learn that this error means "there is something wrong when parsing your module" and you have to go look blindly to figure it out. This is somewhere that puppetlabs could improve things greatly.On Nov 27, 2011, at 7:28 AM, Nigel Kersten wrote:> If there''s a parse error in the manifests, that will be shown, but only each time Puppet re-parses them....> If you''re definitely seeing modules fail to parse, with no errors being thrown, and then the class subsequently can''t be found, please bug report, as that''s definitely a bug. You shouldn''t be completely "blind" here.Assuming that what you say above is right, I would suggest that showing the error only once is only useful for single-digit puppet installations. The problem here is that I have 500+ nodes. So let''s say I''m adjusting a module and testing the effect with "--test". I adjust the module code, then I run "puppet agent --test" on the node which should be affected, and I don''t see the error message related to my changes -- only this complaint that the module isn''t found. Perhaps some other node hit the server first (with about 10 nodes connected at any time, this is fairly likely) and you reported the error to it -- but how can I see this? Should I stumble around on 500 nodes and try to figure out which one contains the error? The current mechanism is not useful in any medium-size installation, nevermind the larger ones (10k+ nodes) which I''ve worked on before. -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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-Nov-28 01:22 UTC
Re: [Puppet Users] cannot find a module in plain sight...
On Sun, Nov 27, 2011 at 2:48 PM, Jo Rhett <jrhett@netconsonance.com> wrote:> On Sat, Nov 26, 2011 at 7:25 PM, Jo Rhett <jrhett@netconsonance.com>wrote: > >> On Nov 25, 2011, at 11:59 AM, Peter Berghold wrote: >> >> err: Could not retrieve catalog from remote server: Error 400 on SERVER: >> Could not find class adminscripts::getvpsnodes for >> slccrepos0.slc.sharkrivertech.com at >> /etc/puppet/manifests/nodes/slccrepos0.pp:4 on node >> slccrepos0.slc.sharkrivertech.com >> warning: Not using cache on failed catalog >> err: Could not retrieve catalog; skipping run >> >> I know it has to be me... what am I missing here? >> >> >> It doesn''t mean it''s not there -- seems to often mean there''s a problem >> in the module. I''ve come to learn that this error means "there is something >> wrong when parsing your module" and you have to go look blindly to figure >> it out. This is somewhere that puppetlabs could improve things greatly. >> > > On Nov 27, 2011, at 7:28 AM, Nigel Kersten wrote: > > If there''s a parse error in the manifests, that will be shown, but only > each time Puppet re-parses them. > > ... > > If you''re definitely seeing modules fail to parse, with no errors being > thrown, and then the class subsequently can''t be found, please bug report, > as that''s definitely a bug. You shouldn''t be completely "blind" here. > > > Assuming that what you say above is right, I would suggest that showing > the error only once is only useful for single-digit puppet installations. > The problem here is that I have 500+ nodes. So let''s say I''m adjusting a > module and testing the effect with "--test". I adjust the module code, > then I run "puppet agent --test" on the node which should be affected, and > I don''t see the error message related to my changes -- only this complaint > that the module isn''t found. Perhaps some other node hit the server first > (with about 10 nodes connected at any time, this is fairly likely) and you > reported the error to it -- but how can I see this? Should I stumble around > on 500 nodes and try to figure out which one contains the error? >No, you should see it in the puppet master logs. Does it not show up there? You certainly shouldn''t be having to hunt around on nodes to discover errors like this. -- Nigel Kersten Product Manager, Puppet Labs -- 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 Nov 27, 2011, at 5:22 PM, Nigel Kersten wrote:> On Sun, Nov 27, 2011 at 2:48 PM, Jo Rhett <jrhett@netconsonance.com> wrote: > Assuming that what you say above is right, I would suggest that showing the error only once is only useful for single-digit puppet installations. The problem here is that I have 500+ nodes. So let''s say I''m adjusting a module and testing the effect with "--test". I adjust the module code, then I run "puppet agent --test" on the node which should be affected, and I don''t see the error message related to my changes -- only this complaint that the module isn''t found. Perhaps some other node hit the server first (with about 10 nodes connected at any time, this is fairly likely) and you reported the error to it -- but how can I see this? Should I stumble around on 500 nodes and try to figure out which one contains the error? > > No, you should see it in the puppet master logs. Does it not show up there? You certainly shouldn''t be having to hunt around on nodes to discover errors like this.Just to re-incarnate this issue, have we fixed this on puppet 3.x? Or at least documented how to easier solve this issue? At most sites the log output scrolls so fast that you need an arcane command line to see these errors: cat /var/log/messages | grep puppet-master | grep -v "Not sending tagmail report" | grep -v "Compiled catalog for " | grep -v "Starting Puppet master" | grep -v "Authentication based on IP address" I tried filtering syslog based on level and did not receive the information I wanted in the separate log. If there is an effective way to do this, documentation of it would be greatly appreciated. -- Jo Rhett Net Consonance : net philanthropy to improve open source and internet projects. -- 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.