I''m trying to get puppet to function with external nodes, i''ve got a script that spits out yaml in the following for my test case "classes: [baseserver, stg2server] " , from this i get the error of "couldn not retrieve catalog: could not find default node or by name with ''heise- laptop'' on node heise-laptop" is there something i''m missing in my yaml , is there something more my external node classifer needs to return other than the yaml and an exit code of 0 ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
j, The yaml output is not formated properly for puppet. It should look more like this: classes: - baseserver - stg2server http://reductivelabs.com/trac/puppet/wiki/ExternalNodes Cheers, Andrew Shafer Reductive Labs On Tue, Sep 23, 2008 at 12:01 PM, heise <j.heise@gmail.com> wrote:> > I''m trying to get puppet to function with external nodes, i''ve got a > script that spits out yaml in the following for my test case "classes: > [baseserver, stg2server] " , from this i get the error of "couldn not > retrieve catalog: could not find default node or by name with ''heise- > laptop'' on node heise-laptop" is there something i''m missing in my > yaml , is there something more my external node classifer needs to > return other than the yaml and an exit code of 0 ? > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
"Andrew Shafer" <andrew@reductivelabs.com> writes:> On Tue, Sep 23, 2008 at 12:01 PM, heise <j.heise@gmail.com> wrote: > > I''m trying to get puppet to function with external nodes, i''ve got a > script that spits out yaml in the following for my test case "classes: > [baseserver, stg2server] " , from this i get the error of "couldn not > retrieve catalog: could not find default node or by name with ''heise- > laptop'' on node heise-laptop" is there something i''m missing in my > yaml , is there something more my external node classifer needs to > return other than the yaml and an exit code of 0 ? >> The yaml output is not formated properly for puppet. It should look more like this: > classes: > - baseserver > - stg2server > > http://reductivelabs.com/trac/puppet/wiki/ExternalNodesDoes puppet have a hand-rolled YAML parser incompatible with the specification? Those two reflect *exactly* the same content: the key ''classes'' associated with an array of two values. There should be absolutely *zero* different between the in-memory representations of those two YAML declarations. Regards, Daniel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
aj@junglist /tmp$ irb -ryaml irb(main):001:0> classes = [ "baseserver", "stg2server" ] => ["baseserver", "stg2server"] irb(main):002:0> puts classes.to_yaml --- - baseserver - stg2server => nil AFAIK, Puppet uses YAML.load / YAML.dump for object manipulation. "claseses: [baseserver, stg2server]" is not a valid yaml array representation? 2008/9/29 Daniel Pittman <daniel@rimspace.net>> > "Andrew Shafer" <andrew@reductivelabs.com> writes: > > On Tue, Sep 23, 2008 at 12:01 PM, heise <j.heise@gmail.com> wrote: > > > > I''m trying to get puppet to function with external nodes, i''ve got a > > script that spits out yaml in the following for my test case > "classes: > > [baseserver, stg2server] " , from this i get the error of "couldn not > > retrieve catalog: could not find default node or by name with ''heise- > > laptop'' on node heise-laptop" is there something i''m missing in my > > yaml , is there something more my external node classifer needs to > > return other than the yaml and an exit code of 0 ? > > > > > The yaml output is not formated properly for puppet. It should look more > like this: > > classes: > > - baseserver > > - stg2server > > > > http://reductivelabs.com/trac/puppet/wiki/ExternalNodes > > Does puppet have a hand-rolled YAML parser incompatible with the > specification? Those two reflect *exactly* the same content: the key > ''classes'' associated with an array of two values. > > There should be absolutely *zero* different between the in-memory > representations of those two YAML declarations. > > Regards, > Daniel > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sorry, forgot to chuck this in there: irb(main):003:0> classes = [ "baseserver", "stg2server" ] => ["baseserver", "stg2server"] irb(main):004:0> yaml_obj = YAML::dump(classes) => "--- \n- baseserver\n- stg2server\n" irb(main):005:0> ruby_obj = YAML::load(yaml_obj) => ["baseserver", "stg2server"] irb(main):006:0> classes == ruby_obj => true 2008/9/29 AJ Christensen <aj@junglist.gen.nz>> aj@junglist /tmp$ irb -ryaml > irb(main):001:0> classes = [ "baseserver", "stg2server" ] > => ["baseserver", "stg2server"] > irb(main):002:0> puts classes.to_yaml > --- > - baseserver > - stg2server > => nil > > AFAIK, Puppet uses YAML.load / YAML.dump for object manipulation. > > "claseses: [baseserver, stg2server]" is not a valid yaml array > representation? > > 2008/9/29 Daniel Pittman <daniel@rimspace.net> > > >> "Andrew Shafer" <andrew@reductivelabs.com> writes: >> > On Tue, Sep 23, 2008 at 12:01 PM, heise <j.heise@gmail.com> wrote: >> > >> > I''m trying to get puppet to function with external nodes, i''ve got a >> > script that spits out yaml in the following for my test case >> "classes: >> > [baseserver, stg2server] " , from this i get the error of "couldn >> not >> > retrieve catalog: could not find default node or by name with >> ''heise- >> > laptop'' on node heise-laptop" is there something i''m missing in my >> > yaml , is there something more my external node classifer needs to >> > return other than the yaml and an exit code of 0 ? >> > >> >> > The yaml output is not formated properly for puppet. It should look more >> like this: >> > classes: >> > - baseserver >> > - stg2server >> > >> > http://reductivelabs.com/trac/puppet/wiki/ExternalNodes >> >> Does puppet have a hand-rolled YAML parser incompatible with the >> specification? Those two reflect *exactly* the same content: the key >> ''classes'' associated with an array of two values. >> >> There should be absolutely *zero* different between the in-memory >> representations of those two YAML declarations. >> >> Regards, >> Daniel >> >> >> >> >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Looks like I spoke too soon, Puppet will use the default YAML in standard ruby and I did get my external nodes to work with that other array format. I wasn''t familiar with that representation of arrays in yaml so the difference stuck out to me. What version of Puppet are you using? In your puppet.conf you should have (unless you have an old version of Puppet): external_nodes = <your script''s full path> node_terminus = exec Based on the message, I suspect you may not have node_terminus set to exec. Make sure that is set and for experiments sake that you can YAML.load the output from your script. If you still get that message, it''s time to get forensic... :/ On Sun, Sep 28, 2008 at 10:12 PM, AJ Christensen <aj@junglist.gen.nz> wrote:> Sorry, forgot to chuck this in there: > irb(main):003:0> classes = [ "baseserver", "stg2server" ] > => ["baseserver", "stg2server"] > irb(main):004:0> yaml_obj = YAML::dump(classes) > => "--- \n- baseserver\n- stg2server\n" > irb(main):005:0> ruby_obj = YAML::load(yaml_obj) > => ["baseserver", "stg2server"] > irb(main):006:0> classes == ruby_obj > => true > > 2008/9/29 AJ Christensen <aj@junglist.gen.nz> > > aj@junglist /tmp$ irb -ryaml >> irb(main):001:0> classes = [ "baseserver", "stg2server" ] >> => ["baseserver", "stg2server"] >> irb(main):002:0> puts classes.to_yaml >> --- >> - baseserver >> - stg2server >> => nil >> >> AFAIK, Puppet uses YAML.load / YAML.dump for object manipulation. >> >> "claseses: [baseserver, stg2server]" is not a valid yaml array >> representation? >> >> 2008/9/29 Daniel Pittman <daniel@rimspace.net> >> >> >>> "Andrew Shafer" <andrew@reductivelabs.com> writes: >>> > On Tue, Sep 23, 2008 at 12:01 PM, heise <j.heise@gmail.com> wrote: >>> > >>> > I''m trying to get puppet to function with external nodes, i''ve got >>> a >>> > script that spits out yaml in the following for my test case >>> "classes: >>> > [baseserver, stg2server] " , from this i get the error of "couldn >>> not >>> > retrieve catalog: could not find default node or by name with >>> ''heise- >>> > laptop'' on node heise-laptop" is there something i''m missing in my >>> > yaml , is there something more my external node classifer needs to >>> > return other than the yaml and an exit code of 0 ? >>> > >>> >>> > The yaml output is not formated properly for puppet. It should look >>> more like this: >>> > classes: >>> > - baseserver >>> > - stg2server >>> > >>> > http://reductivelabs.com/trac/puppet/wiki/ExternalNodes >>> >>> Does puppet have a hand-rolled YAML parser incompatible with the >>> specification? Those two reflect *exactly* the same content: the key >>> ''classes'' associated with an array of two values. >>> >>> There should be absolutely *zero* different between the in-memory >>> representations of those two YAML declarations. >>> >>> Regards, >>> Daniel >>> >>> >>> >> > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---