(root)@puppetmaster:~# cat /etc/puppet/puppet.conf [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet external_nodes = /usr/local/bin/external.sh node_terminus = exec (root)@puppetmaster:~# cat /usr/local/bin/external.sh #/bin/bash # puppet classifier grep -w "$1" /etc/puppet/SITEs/*/hosts | awk -F/ ''{printf "---\nclasses:\n - %s\n", $5}'' echo " - stb" (root)@puppetmaster:~# /usr/local/bin/external.sh nvcp07.example.net --- classes: - den-nms - stb puppet client says this Aug 23 04:11:51 nvcp07.example.net puppetd[17887]: [ID 702911 daemon.error] Could not retrieve catalog: Could not find node ''nvcp07.example.net''; cannot compile puppetmaster says this debug: Allowing authenticated client nvcp07.example.net(192.168.0.135) access to puppetmaster.getconfig debug: Our client is remote info: Expiring the node cache of nvcp07.example.net info: Not using expired node for nvcp07.example.net from cache; expired at Sun Aug 23 00:34:14 -0400 2009 debug: Executing ''/usr/local/bin/external.sh nvcp07.example.net'' err: Could not call: Could not find node ''nvcp07.example.net''; cannot compile why? on puppetmaster when I run it manually it works fine # /usr/local/bin/external.sh nvcp07.example.net --- classes: - den-nms - stb -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
What''s the exit status of your script? Try: # /usr/local/bin/external.sh nvcp07.example.net . . . # echo $? It needs to be 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 -~----------~----~----~----~------~----~------~--~---
On Sun, Aug 23, 2009 at 4:03 AM, Keith Edmunds<kae@midnighthax.com> wrote:> > What''s the exit status of your script? Try: > > # /usr/local/bin/external.sh nvcp07.example.net > . > . > . > # echo $? > > It needs to be 0.It is 0. (root)@sys-ubuntu:~# /usr/local/bin/external.sh nvcp07.example.net --- classes: - den-nms - stb (root)@sys-ubuntu:~# echo $? 0 (root)@sys-ubuntu:~#> > > >-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --~--~---------~--~----~------------~-------~--~----~ 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 Sun, Aug 23, 2009 at 11:11 AM, Asif Iqbal<vadud3@gmail.com> wrote:> On Sun, Aug 23, 2009 at 4:03 AM, Keith Edmunds<kae@midnighthax.com> wrote: >> >> What''s the exit status of your script? Try: >> >> # /usr/local/bin/external.sh nvcp07.example.net >> . >> . >> . >> # echo $? >> >> It needs to be 0. > > It is 0. > > (root)@sys-ubuntu:~# /usr/local/bin/external.sh nvcp07.example.net > --- > classes: > - den-nms > - stb > (root)@sys-ubuntu:~# echo $? > 0 > (root)@sys-ubuntu:~# >I tried to add some parameters and that did not help. puppetmaster still says debug: Executing ''/usr/local/bin/external.sh nvcp07.example.net'' err: Could not call: Could not find node ''nvcp07.example.net''; cannot compile but when running manually it looks just fine (root)@sys-ubuntu:~# /usr/local/bin/external.sh nvcp07.example.net --- classes: - den-nms - stb parameters: temp: "123" puppetmaster: sys-ubuntu.example.net (root)@sys-ubuntu:~# echo $? 0 (root)@sys-ubuntu:~# ls /etc/puppet/manifests/classes/den-nms.pp /etc/puppet/manifests/classes/den-nms.pp (root)@sys-ubuntu:~# ls /etc/puppet/manifests/classes/stb.pp /etc/puppet/manifests/classes/stb.pp> >> >> >> >> > > > > -- > Asif Iqbal > PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? >-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --~--~---------~--~----~------------~-------~--~----~ 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 Sun, Aug 23, 2009 at 11:41 AM, Asif Iqbal<vadud3@gmail.com> wrote:> On Sun, Aug 23, 2009 at 11:11 AM, Asif Iqbal<vadud3@gmail.com> wrote: >> On Sun, Aug 23, 2009 at 4:03 AM, Keith Edmunds<kae@midnighthax.com> wrote: >>> >>> What''s the exit status of your script? Try: >>> >>> # /usr/local/bin/external.sh nvcp07.example.net >>> . >>> . >>> . >>> # echo $? >>> >>> It needs to be 0. >> >> It is 0. >> >> (root)@sys-ubuntu:~# /usr/local/bin/external.sh nvcp07.example.net >> --- >> classes: >> - den-nms >> - stb >> (root)@sys-ubuntu:~# echo $? >> 0 >> (root)@sys-ubuntu:~# >> > > I tried to add some parameters and that did not help. puppetmaster still says > > debug: Executing ''/usr/local/bin/external.sh nvcp07.example.net'' > err: Could not call: Could not find node ''nvcp07.example.net''; cannot compile > > but when running manually it looks just fine > > (root)@sys-ubuntu:~# /usr/local/bin/external.sh nvcp07.example.net > --- > classes: > - den-nms > - stb > parameters: > temp: "123" > puppetmaster: sys-ubuntu.example.net > > (root)@sys-ubuntu:~# echo $? > 0 > > (root)@sys-ubuntu:~# ls /etc/puppet/manifests/classes/den-nms.pp > /etc/puppet/manifests/classes/den-nms.pp > > (root)@sys-ubuntu:~# ls /etc/puppet/manifests/classes/stb.pp > /etc/puppet/manifests/classes/stb.pp >my yaml format was incorrect. would have been nice if the puppetmaster debug would disclose that. it is working since then. Volcane from #puppet channel help me to achieve it.> >-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Asif Iqbal wrote:> > my yaml format was incorrect. would have been nice if the puppetmaster > debug would disclose that. >If you think this would help please raise a feature request asking for a better error. Thanks James Turnbull - -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEcBAEBAgAGBQJKk1MgAAoJECFa/lDkFHAye64H/1Q5gW7ht7kOH8pZbxNqaahr htDOJB/6p2MWCTaih/QBzQPQ4v8WoWDU0YPbiz9BPBoofkmVNqYYyKRK/lQZ6S8+ Rq1ZLfZHEHeN9u1lFRb4cNvkl8+ZMDrCbkAjXAXEDlTj/mpldA6PTq5e9zihn4qi 1ixtcrF5Gw8yk17HR6RWLVwT2lA7jzfUzvNa2o5T10HMtLOyegxWuZprmZOoc848 lg+YK4RVocleFRaH1yC49i9nFj+Q1gxzcohu6itrJYMXij9504JgJf/zO/W/y0TY wxR6Pi6KDcxb18na/zCtJZe8ILZtzcfP2sKggE6bbP8+rhkLm0yPGRMfJNoGTDw=NQDW -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I add some code to indirector/exec.rb so that I can get some error messages back in case of failure, without it I would be helplessly stuck when trying to debug external node errors (for 24.8 anyways..). Its one line of code, it is mentioned in the following ticket. http://projects.reductivelabs.com/issues/2385 (which was marked as a duplicate of something?) --~--~---------~--~----~------------~-------~--~----~ 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 Tue, Sep 1, 2009 at 2:03 PM, Dan Bode<bodepd@gmail.com> wrote:> I add some code to indirector/exec.rb so that I can get some error messages > back in case of failure, without it I would be helplessly stuck when trying > to debug external node errors (for 24.8 anyways..). > > Its one line of code, it is mentioned in the following ticket. > > http://projects.reductivelabs.com/issues/2385 (which was marked as a > duplicate of something?)Thanks for it!> > > > >-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---