Funny. Using the following script from the 
wiki(http://reductivelabs.com/trac/puppet/wiki/ExternalNodes): 

#!/bin/sh
# Super-simple external_node script for versions 0.23 and later
cat <<"END"
---
classes:
  - basesystem
parameters:
  puppet_server: puppet.example.com
  dns_server: ns.example.com
  mail_server: mail.example.com
END
exit 0

The problem is still the same: nodes defined in site.pp are executed 
with all their defined classes (not just basesystem) and notes which are 
not defined in site.pp still say

"err: Could not retrieve catalog: Could not find default node or by name 
with 'host03-lists.dev.test.de, host03-lists.dev.test, host03-lists.dev, 
host03-lists' on node host03-lists.dev.test.de"

When I add a "sleep 60" into the script I can see that it is run with 
"host03-lists.dev.test.de" as argument by user puppet. 
 
Kurt 

> -----Original Message-----
> From: Luke Kanies [mailto:[EMAIL PROTECTED] 
> Sent: Dienstag, 18. November 2008 00:28
> To: puppet-users@googlegroups.com
> Subject: [Puppet Users] Re: External_nodes definition not 
> working. Client states "could not find node"
> 
> 
> And you're sure that's the exact name that the script is 
> being called with?
> 
> There's something screwy going on somewhere.  Are you calling 
> the script as the same user?  Could that be the problem?
> 
> On Nov 15, 2008, at 1:50 PM, Kurt Bendlin wrote:
> 
> > ./external-node-script.pl host02-dns.dev.test.de
> > perl: warning: Setting locale failed.
> > perl: warning: Please check that your locale settings:
> >         LANGUAGE = (unset),
> >         LC_ALL = (unset),
> >         LANG = "en_US.ISO-8859-15"
> >     are supported and installed on your system.
> > perl: warning: Falling back to the standard locale ("C").
> > ---
> > classes:
> >   - basesystem
> >   - powerdns-apache2
> >   - powerdns-mysql
> >   - ec2-nameserver
> > parameters:
> >   domainid: 10
> >   domainname: dev.test.de
> > puppeteer:/etc/puppets/config-development-dev-HEAD#
> > I guess the Perl warnings doesn't harm the script but i gonna solve 
> > the locales-problem on this system now to exclude this as a 
> > problemsource.
> >
> > Kurt
> >
> >    From: Andrew Shafer [mailto:[EMAIL PROTECTED]
> > Sent: Samstag, 15. November 2008 17:55
> > To: puppet-users@googlegroups.com
> > Subject: [Puppet Users] Re: External_nodes definition not working.  
> > Client states "could not find node"
> >
> > What does the yaml output look like when you run the script 
> by itself?
> >
> >
> > On Sat, Nov 15, 2008 at 2:36 AM, Kurz Bendlin <[EMAIL PROTECTED]>
> > wrote:
> >
> >
> >
> >
> >
> > Am 14.11.2008 um 19:45 schrieb Luke Kanies <[EMAIL PROTECTED]>:
> >
> > >
> > > On Nov 14, 2008, at 7:45 AM, Kurt Bendlin wrote:
> > >
> > >>
> > >>
> > >> Hello folks,
> > >>
> > >> Im trying to migrate from static nodes-definition to 
> external nodes
> > >> definition.
> > >>
> > >> My script looks like this stolen from
> > >> http://reductivelabs.com/trac/puppet/wiki/ExternalNodes:
> > >>
> > >> {{{
> > >>
> > >> #!/usr/bin/perl -w
> > >> use warnings;
> > >> use YAML qw( Dump );
> > >> use Switch;
> > >>
> > >> #initialize vars
> > >> our @classes;
> > >> our %parameters;
> > >>
> > >> Function to fill @classes and %parameters with correct values
> > >> ....
> > >>
> > >> print Dump( {
> > >> classes     => [EMAIL PROTECTED],
> > >> parameters  => \%parameters,
> > >> } );
> > >>
> > >> }}}
> > >>
> > >> I added a "debug" function to write the YAML-Dump() output to
> > >> textfile
> > >> to verify that this script is running and produces 
> correct output.
> > >>
> > >> Unfortunalety the nodes can't get the config anymore:
> > >>
> > >> err: Could not retrieve catalog: Could not find default 
> node or by
> > >> name
> > >> with 'host02-test.rev.domainname, host02-test.rev.domainname,
> > >> host02-test.rev, host02-test' on node host02-test.rev.domainname
> > >>
> > >> But in the debug-textfile I can see yaml-markuped entries
> > >>
> > >> ---
> > >> Classes:
> > >> - basesystem
> > >> Parameters:
> > >> revision: rev
> > >>
> > >>
> > >> Master and Client runs 0.24.5
> > >>
> > >> Does anyone have a hint why it doesn't work?
> > >
> > >
> > > When you run it with the host name as its only argument, 
> do you get
> > > the yaml on stdout?
> > >
> > Yes I do. I used the debugfile to see if the script is 
> actual running
> > by puppetmaster and if it is performed with "the correct fqdn- 
> > hostname".
> >
> > > You should be able to just run it like a normal script; there's no
> > > need to debug it within Puppet.
> > >
> > > --
> > > The one thing more difficult than following a regimen is not
> > > imposing it
> > > on others. -- Marcel Proust
> > >  
> > 
> ---------------------------------------------------------------------
> > > Luke Kanies | http://reductivelabs.com | http://madstop.com
> > >
> > >
> > > >
> >
> >
> >
> >
> >
> >
> >
> > >
> 
> 
> -- 
> Learning is not attained by chance, it must be sought for 
> with ardor and
> attended to with diligence. -- Abigail Adams
> ---------------------------------------------------------------------
> 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to