Mixing External and Local Nodes

17 views
Skip to first unread message

Douglas Garstang

unread,
Aug 20, 2010, 3:16:38 PM8/20/10
to Puppet Users
In puppet 0.25.5, I was able to mix external and not external nodes.
For example, for node01 I could have it's configuration in an external
node, and for node2, have it in node2.pp. Now, with puppet 2.6, and
the following specified in puppet.conf:

external_nodes = /etc/puppet/manifests/extdata/getnode
node_terminus = exec

the puppet master complains that it can't find the node for all NON
external nodes. How do I do this in puppet 2.6?

Doug

Gary Larizza

unread,
Aug 20, 2010, 3:50:11 PM8/20/10
to puppet...@googlegroups.com
In our External Node Classifier script if the node passed isn't found, it returns a blank YAML block...which is Puppet's que to look into our nodes.pp file for the node.  This is different from returning NOTHING, as it has to return a block of YAML with nothing in it  - in Ruby it looks like this (for us, at least):

    default = {'classes' => []}
    print default.to_yaml

Are you returning an empty YAML block in your External Node Classifer script when Puppet should look to your config files (as opposed to the External Node Classifier script) for the node information?  If so, I'd say this might be a bug.

-Gary

Douglas Garstang

unread,
Aug 20, 2010, 4:13:37 PM8/20/10
to puppet...@googlegroups.com

Yeah. I think I forgot that your supposed to return a blank yaml block
if the external node script can't find the node, which then imforms
puppet to go look at the files. Probably because that's not documented
anywhere. So, I fixed that, and now, I have this in
/etc/puppet/puppet.conf:

external_nodes = /etc/puppet/getnode
node_terminus = exec

and an external node in
/etc/puppet/manifests/extdata/app01.foo.com.yaml, which contains:

---
XXX
classes:
- facility::paloalto
- hardware::vmware
- function::appServer
- elements::tfel0

xenvironment: production
parameters:
node_ldap_groupdn: cn=ops,ou=groups,dc=foo,dc=com

yes, with bogus data. There's an extraneous 'XXX' there and
environment has an 'x' prefixed to the front. Puppet isn't finding it,
it seems because the client is just logging:

Aug 20 20:08:09 s_...@app01.foo.com puppet-agent[14873]: Starting
Puppet client version 2.6.0
Aug 20 20:08:09 s_...@app01.foo.com puppet-agent[14873]: Finished
catalog run in 0.03 seconds

and when I run the script manually, I get:

prov01 /etc/puppet/manifests/extdata:# /etc/puppet/getnode app01.foo.com
---
XXX
classes:
- facility::paloalto
- hardware::vmware
- function::appServer
- elements::tfel0

xenvironment: production
parameters:
node_ldap_groupdn: cn=ops,ou=groups,dc=foo,dc=com

So... something is borked with puppet and I don't know what. *sigh*

Doug.

Reply all
Reply to author
Forward
0 new messages