If anyone has any ideas, please share. I''m at a loss. YAML from Puppet Enterprise 2.0.0 default ENC: ++++++++++++++++++++++++++++++++ --- name: rcf-cm-master.our.org parameters: {} classes: - core-permissions ++++++++++++++++++++++++++++++++ YAML from my Python ENC using PyYAML. This results in ''cannot find node''. ++++++++++++++++++++++++++++++++ --- classes: - core-permissions name: rcf-cm-master.our.org parameters: {} ++++++++++++++++++++++++++++++++ Note that putting the YAML output above in a file and loading it with Ruby''s YAML::load does not throw an exception. I''m stumped :| -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/VChRtFes9wEJ. 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.
Daniel Pittman
2012-Jan-25 23:32 UTC
Re: [Puppet Users] My ENC won''t work, YAML is valid AFAIK
On Wed, Jan 25, 2012 at 15:15, jblaine <cjblaine@gmail.com> wrote:> If anyone has any ideas, please share. I''m at a loss. > YAML from Puppet Enterprise 2.0.0 default ENC: > > ++++++++++++++++++++++++++++++++ > --- > name: rcf-cm-master.our.org > parameters: {} > > classes: > - core-permissions > ++++++++++++++++++++++++++++++++ > > YAML from my Python ENC using PyYAML. This results in ''cannot find node''. > > ++++++++++++++++++++++++++++++++ > --- > classes: > - core-permissions > name: rcf-cm-master.our.org > parameters: {} > ++++++++++++++++++++++++++++++++ > > Note that putting the YAML output above in a file and loading it with Ruby''s > YAML::load does not throw an exception. > > I''m stumped :|Both of those produce exactly the same content when loaded with the default Ruby YAML parser, which should be how we load that stuff, and everything works from my local testing too. :/ Can you dig deeper into what is going on inside your script? Perhaps something else is going wrong?> > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/VChRtFes9wEJ. > 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.-- Daniel Pittman ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- 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
2012-Jan-25 23:46 UTC
Re: [Puppet Users] My ENC won''t work, YAML is valid AFAIK
When you run your script by hand, does it exit 0 ? Does it do so when the user you are running the master as (pe-puppet I believe in this case) runs the script? On Wed, Jan 25, 2012 at 3:15 PM, jblaine <cjblaine@gmail.com> wrote:> If anyone has any ideas, please share. I''m at a loss. > > YAML from Puppet Enterprise 2.0.0 default ENC: > > ++++++++++++++++++++++++++++++++ > --- > name: rcf-cm-master.our.org > parameters: {} > > classes: > - core-permissions > ++++++++++++++++++++++++++++++++ > > YAML from my Python ENC using PyYAML. This results in ''cannot find node''. > > ++++++++++++++++++++++++++++++++ > --- > classes: > - core-permissions > name: rcf-cm-master.our.org > parameters: {} > ++++++++++++++++++++++++++++++++ > > Note that putting the YAML output above in a file and loading it with > Ruby''s > YAML::load does not throw an exception. > > I''m stumped :| > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/VChRtFes9wEJ. > 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 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.
Yes, the code outputs nothing and calls sys.exit(1) if the host cannot be found in our database. Running as pe-puppet, which the stock ENC runs as from what I can tell, it runs fine and $? is 0. [ 5 minutes later ] Oh jeez. I was misreading the red "Log" info for it, assuming it was the same old "could not find node" from earlier when I had a problem that I had eventually fixed. It is now saying "could not find class bedford", which I fully expect at this stage. Thank you both for looking into this with me, and sorry to waste anyone''s time. IDEA: Allow for a special YAML document to be spit out by custom ENCs when error conditions in the ENC are hit. It would contain information that can be shown in the console/reports ? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/mqNSCdElZGAJ. 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.
Daniel Pittman
2012-Jan-26 01:22 UTC
Re: [Puppet Users] My ENC won''t work, YAML is valid AFAIK
On Wed, Jan 25, 2012 at 17:19, jblaine <cjblaine@gmail.com> wrote:> IDEA: Allow for a special YAML document to be spit out by custom ENCs > when error conditions in the ENC are hit. It would contain information that > can be shown in the console/reports ?Sounds good. I am happy to look at extending the exec ENC protocol to support that. I would take a patch, but if you just want to file a feature request we will look to this when we next touch that protocol. (Which is probably not that far off, for unrelated reasons.) -- Daniel Pittman ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- 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.