error trying ENC.

99 views
Skip to first unread message

erasmo

unread,
Jun 2, 2012, 12:04:53 AM6/2/12
to Puppet Users
Hello, I'm trying to use External Node classification and I have not
idea what is my mistake.
I getting the following error :

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: undefined method `downcase' for ["hola",
{"mens"=>"HOLA"}]:Array on node casa


I have a very simple parameter class :

class hola( $mens = "HELLO" ) {

notify{"puppet": message => "$mens"}

}

I'm setting puppet.conf in master section :

node_terminus = exec
external_nodes = /etc/puppet/tools/dummycp.sh

My script dummycp.sh is :

#!/bin/sh
cat <<"END"
---
classes:
hola:
mens: HOLA
parameters:
manager: Jane Doe
END
exit 0

I appreciate any help,
thanks in advance,
eduardo.

Rémi

unread,
Jun 4, 2012, 11:06:55 AM6/4/12
to puppet...@googlegroups.com
Hi,

i couldn't reproduce your problem with Puppet 2.7.14 :

# tree /etc/puppet/modules
/etc/puppet/modules/
└── hola
    └── manifests
        └── init.pp

# cat /etc/puppet/modules/hola/manifests/init.pp
class hola( $mens = "HELLO" ) {
notify{"puppet": message => "$mens"}
}


# /usr/local/bin/enc.sh

---
classes:
  hola:
    mens: HOLA
parameters:
  manager: Jane Doe


# puppet agent -t
notice: Ignoring --listen on onetime run
info: Retrieving plugin
info: Caching catalog for xxx
info: Applying configuration version 'x'
notice: HOLA
notice: /Stage[main]/Hola/Notify[puppet]/message: defined 'message' as 'HOLA'
notice: Finished catalog run in 0.03 seconds

erasmo

unread,
Jun 4, 2012, 12:16:30 PM6/4/12
to Puppet Users
Thanks remi for your answer, I have 2.6.4 puppet version installed
from ubuntu natty (11.04) repos (initials one, without any upgrade of
them).

I'm don't pretty sure if uninstall ubuntu packages and install all
via gems.

I'm testing having agent and master locally, i'm wondering, is there
any problem about it ?. Everything is ok but not an important theme
like ENC.

regards,
eduardo

erasmo

unread,
Jun 4, 2012, 12:22:21 PM6/4/12
to Puppet Users
Thanks remi for your answer, I have 2.6.4 puppet version installed
from ubuntu natty (11.04) repos (initials one, without any upgrade of
them).

I'm don't pretty sure if uninstall packages and install it via gems.

I'm testing having agent and master locally, i'm wondering, is there
any problem about it ?. Everything is ok but not an important theme
like ENC.

regards,
eduardo

On 4 jun, 11:06, Rémi <ere...@gmail.com> wrote:

Rémi

unread,
Jun 4, 2012, 3:39:23 PM6/4/12
to puppet...@googlegroups.com
Hi,

You need Puppet 2.6.5 to use ENC and parametized class.
"As of Puppet 2.6.5, parameterized classes can be declared by external node classifiers; see the ENC documentation for details."
It's time to upgrade ;-)

Regards

eduardo

unread,
Jun 4, 2012, 6:02:53 PM6/4/12
to Puppet Users
Thank you very much, I had read it many , many , many times, but I
don't realize about that HEADLINE.
I appreciate your help and I'm going to upgrade.

Regards,
eduardo.


On 4 jun, 15:39, Rémi <ere...@gmail.com> wrote:
> Hi,
>
> You need Puppet 2.6.5 to use ENC and parametized class.
> "As of Puppet 2.6.5, parameterized classes can be declared by external node
> classifiers; see the ENC documentation<http://docs.puppetlabs.com/guides/external_nodes.html> for
Reply all
Reply to author
Forward
0 new messages