What should an external node script output when it can''t find the node? The docs here: http://docs.puppetlabs.com/guides/external_nodes.html are incomplete and don''t specify. it''s my understanding, and previous experience (somehow) that when the enc script can''t find the node, that puppet should look to the nodes.pp file. However, my client (which is in nodes.pp, but not found by the enc script) is displaying: Dec 28 21:22:08 dev-ge-admin-01 puppet-agent[32263]: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node dev-ge-admin-01.c4-e.com: Could not load external node results for dev-ge-admin-01.c4-e.com: undefined method `inject'' for nil:NilClass I''ve tried having the enc script output nothing, and ''---'' with an exit code of 0. Same result on client. Doug -- 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.
Did a little more reading. Even when the external node script prints an empty YAML document, ''---'', I still get that error. Doug. On Wed, Dec 28, 2011 at 1:27 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> What should an external node script output when it can''t find the > node? The docs here: > > http://docs.puppetlabs.com/guides/external_nodes.html > > are incomplete and don''t specify. it''s my understanding, and previous > experience (somehow) that when the enc script can''t find the node, > that puppet should look to the nodes.pp file. However, my client > (which is in nodes.pp, but not found by the enc script) is displaying: > > Dec 28 21:22:08 dev-ge-admin-01 puppet-agent[32263]: Could not > retrieve catalog from remote server: Error 400 on SERVER: Failed when > searching for node dev-ge-admin-01.c4-e.com: Could not load external > node results for dev-ge-admin-01.c4-e.com: undefined method `inject'' > for nil:NilClass > > I''ve tried having the enc script output nothing, and ''---'' with an > exit code of 0. Same result on client. > > Doug-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 -- 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 Wed, Dec 28, 2011 at 3:13 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> Did a little more reading. Even when the external node script prints > an empty YAML document, ''---'', I still get that error.Try this as your ENC: #!/bin/sh echo ''--- parameters: '' exit 0 Thanks, Nan -- 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 Wed, Dec 28, 2011 at 3:30 PM, Nan Liu <nan@puppetlabs.com> wrote:> On Wed, Dec 28, 2011 at 3:13 PM, Douglas Garstang > <doug.garstang@gmail.com> wrote: >> Did a little more reading. Even when the external node script prints >> an empty YAML document, ''---'', I still get that error. > > Try this as your ENC: > #!/bin/sh > echo ''--- > parameters: > '' > exit 0 > > Thanks, > > NanNew error now. My enc.sh has: root@puppet1:/etc/puppet# cat enc.sh #!/bin/sh echo ''--- parameters: '' exit 0 which produces the following output: root@puppet1:/etc/puppet# ./enc.sh ddd --- parameters: However, a random node is now reporting: Dec 28 23:51:13 dev-ge-bastion-01 puppet-agent[3340]: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class sudo at /etc/puppet/ge/manifests/nodes.pp:4 on node dev-ge-bastion-01.c4-e.com Doug -- 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 Wed, Dec 28, 2011 at 3:53 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> On Wed, Dec 28, 2011 at 3:30 PM, Nan Liu <nan@puppetlabs.com> wrote: >> On Wed, Dec 28, 2011 at 3:13 PM, Douglas Garstang >> <doug.garstang@gmail.com> wrote: >>> Did a little more reading. Even when the external node script prints >>> an empty YAML document, ''---'', I still get that error. >> >> Try this as your ENC: >> #!/bin/sh >> echo ''--- >> parameters: >> '' >> exit 0 >> >> Thanks, >> >> Nan > > New error now. My enc.sh has: > > > root@puppet1:/etc/puppet# cat enc.sh > #!/bin/sh > echo ''--- > parameters: > '' > exit 0 > > > which produces the following output: > > > root@puppet1:/etc/puppet# ./enc.sh ddd > --- > parameters: > > However, a random node is now reporting: > > > Dec 28 23:51:13 dev-ge-bastion-01 puppet-agent[3340]: Could not > retrieve catalog from remote server: Error 400 on SERVER: Could not > find class sudo at /etc/puppet/ge/manifests/nodes.pp:4 on node > dev-ge-bastion-01.c4-e.com > > DougActually, I think that fixed it. Thanks. This new error was hiding behind that one. I wonder ask why someone can''t fix the documentation to reflect reality, or else I''ll be branded a trouble maker like before. Doug. -- 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 Wed, Dec 28, 2011 at 3:53 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> On Wed, Dec 28, 2011 at 3:30 PM, Nan Liu <nan@puppetlabs.com> wrote: >> On Wed, Dec 28, 2011 at 3:13 PM, Douglas Garstang >> <doug.garstang@gmail.com> wrote: >>> Did a little more reading. Even when the external node script prints >>> an empty YAML document, ''---'', I still get that error. >> >> Try this as your ENC: >> #!/bin/sh >> echo ''--- >> parameters: >> '' >> exit 0 >> >> Thanks, >> >> Nan > > New error now. My enc.sh has: > > > root@puppet1:/etc/puppet# cat enc.sh > #!/bin/sh > echo ''--- > parameters: > '' > exit 0 > > > which produces the following output: > > > root@puppet1:/etc/puppet# ./enc.sh ddd > --- > parameters: > > However, a random node is now reporting: > > > Dec 28 23:51:13 dev-ge-bastion-01 puppet-agent[3340]: Could not > retrieve catalog from remote server: Error 400 on SERVER: Could not > find class sudo at /etc/puppet/ge/manifests/nodes.pp:4 on node > dev-ge-bastion-01.c4-e.comNot really sure, if you are using 2.7.x might be: http://projects.puppetlabs.com/issues/8433 Thanks, Nan -- 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 Wed, Dec 28, 2011 at 3:55 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> On Wed, Dec 28, 2011 at 3:53 PM, Douglas Garstang > <doug.garstang@gmail.com> wrote: >> On Wed, Dec 28, 2011 at 3:30 PM, Nan Liu <nan@puppetlabs.com> wrote: >>> On Wed, Dec 28, 2011 at 3:13 PM, Douglas Garstang >>> <doug.garstang@gmail.com> wrote: >>>> Did a little more reading. Even when the external node script prints >>>> an empty YAML document, ''---'', I still get that error. >>> >>> Try this as your ENC: >>> #!/bin/sh >>> echo ''--- >>> parameters: >>> '' >>> exit 0 >>> >>> Thanks, >>> >>> Nan >> >> New error now. My enc.sh has: >> >> >> root@puppet1:/etc/puppet# cat enc.sh >> #!/bin/sh >> echo ''--- >> parameters: >> '' >> exit 0 >> >> >> which produces the following output: >> >> >> root@puppet1:/etc/puppet# ./enc.sh ddd >> --- >> parameters: >> >> However, a random node is now reporting: >> >> >> Dec 28 23:51:13 dev-ge-bastion-01 puppet-agent[3340]: Could not >> retrieve catalog from remote server: Error 400 on SERVER: Could not >> find class sudo at /etc/puppet/ge/manifests/nodes.pp:4 on node >> dev-ge-bastion-01.c4-e.com >> >> Doug > > Actually, I think that fixed it. Thanks. This new error was hiding > behind that one. I wonder ask why someone can''t fix the documentation > to reflect reality, or else I''ll be branded a trouble maker like > before.A patch to docs.puppetlabs.com would be most welcomed if it''s inaccurate: https://github.com/puppetlabs/puppet-docs Thanks, Nan -- 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.