Jason Barlow
2013-Aug-21 23:04 UTC
[Puppet Users] Trouble with ENC and static.pp : enabling ENC fails to find node even with default node in site.pp
I''m having some trouble with getting an ENC to work alongside site.pp:
Even with a ''default'' node definition, and an ENC that only
returns 0,
regardless of input, consistently results in a ''cannot find
node'' error.
I''m wondering what I''ve missed here.
I''ve tried to reduce everything to a ''base case'': and
I''m running 3.2.4 on
the client and master both:
Here''s what I''m trying:
here''s my static node definition:
*site.pp:*
*node default {*
* notify { "static node definition": }*
*
*
*}*
and my puppet.conf without any node definition:
*puppet.conf*
*[master]*
* node_terminus = plain*
works beautifully:
*[root@vacsld01target ~]# /usr/bin/puppet agent --onetime --daemonize
--verbose --test*
*Info: Retrieving plugin*
*<snip>*
*Info: Caching catalog for vacsld01target.oss.central1.com*
*Info: Applying configuration version ''1377125492''*
*Notice: static node definition*
*Notice: /Stage[main]//Node[default]/Notify[static node
definition]/message: defined ''message'' as ''static
node definition''*
*Notice: Finished catalog run in 0.05 seconds*
If I enable an ENC that only returns 0 regardless of input with the same
site.pp configuration:
*puppet.conf*
[master]
* node_terminus = exec*
* external_nodes = /var/lib/puppet/null-nodes.py*
* reports = store*
* reportdir = /var/lib/puppet/reports*
*[root@vacslp01pmaster manifests]# cat /var/lib/puppet/null-nodes.py*
*#!/usr/bin/python*
*import sys*
*sys.exit(0)*
running the ENC by hand as user puppet:
*[root@vacslp01pmaster manifests]# sudo -u puppet
/var/lib/puppet/null-nodes.py ; echo $?*
*0*
*restart puppetmaster*
*rerun the client*
*
*
*[root@vacsld01target ~]# /usr/bin/puppet agent --onetime --daemonize --test
*
Info: Retrieving plugin
<snip>
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find node ''vacsld01target.oss.central1.com''; cannot
compile
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
[root@vacsld01target ~]#
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
Jason Barlow
2013-Aug-22 16:09 UTC
[Puppet Users] Re: Trouble with ENC and static.pp : enabling ENC fails to find node even with default node in site.pp
Ok, I''ve got a workaround. if I return some valid YAML in addition to
the
0 return value, everything works like poptarts:
* null_obj = { ''vars'' : { ''emptyvar'':
''0''}}*
* print yaml.dump(null_obj, Dumper = yaml.SafeDumper)*
* exit(0)*
then the node definitions (including default node definitions) are found in
site.pp:
*Notice: vacsld01target node definition*
*Notice:
/Stage[main]//Node[vacsld01target.oss.central1.com]/Notify[vacsld01target
node definition]/message: defined ''message'' as
''vacsld01target node
definition''*
*Notice: Finished catalog run in 0.24 seconds*
On Wednesday, 21 August 2013 16:04:27 UTC-7, Jason Barlow
wrote:>
> I''m having some trouble with getting an ENC to work alongside
site.pp:
>
> Even with a ''default'' node definition, and an ENC that
only returns 0,
> regardless of input, consistently results in a ''cannot find
node'' error.
> I''m wondering what I''ve missed here.
>
> I''ve tried to reduce everything to a ''base
case'': and I''m running 3.2.4 on
> the client and master both:
>
> Here''s what I''m trying:
>
> here''s my static node definition:
>
> *site.pp:*
> *node default {*
> * notify { "static node definition": }*
> *
> *
> *}*
>
> and my puppet.conf without any node definition:
>
> *puppet.conf*
> *[master]*
> * node_terminus = plain*
>
> works beautifully:
>
> *[root@vacsld01target ~]# /usr/bin/puppet agent --onetime --daemonize
> --verbose --test*
> *Info: Retrieving plugin*
> *<snip>*
> *Info: Caching catalog for vacsld01target.oss.central1.com*
> *Info: Applying configuration version ''1377125492''*
> *Notice: static node definition*
> *Notice: /Stage[main]//Node[default]/Notify[static node
> definition]/message: defined ''message'' as
''static node definition''*
> *Notice: Finished catalog run in 0.05 seconds*
>
>
> If I enable an ENC that only returns 0 regardless of input with the same
> site.pp configuration:
>
> *puppet.conf*
> [master]
> * node_terminus = exec*
> * external_nodes = /var/lib/puppet/null-nodes.py*
> * reports = store*
> * reportdir = /var/lib/puppet/reports*
>
>
> *[root@vacslp01pmaster manifests]# cat /var/lib/puppet/null-nodes.py*
> *#!/usr/bin/python*
> *import sys*
> *sys.exit(0)*
>
> running the ENC by hand as user puppet:
>
> *[root@vacslp01pmaster manifests]# sudo -u puppet
> /var/lib/puppet/null-nodes.py ; echo $?*
> *0*
>
>
> *restart puppetmaster*
> *rerun the client*
> *
> *
> *[root@vacsld01target ~]# /usr/bin/puppet agent --onetime --daemonize
> --test*
> Info: Retrieving plugin
> <snip>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Could not find node ''vacsld01target.oss.central1.com'';
cannot compile
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
> [root@vacsld01target ~]#
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.