[Puppet Users] Help needed in setting up a simple ENC

2013-02-20 Thread serwei2014
puppet maser conf:
[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl

[master]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
user = root
group = root
fileserverconfig = /etc/puppet/fileserver.conf
reportdir = /home/logs/puppet/reports
masterhttplog = /home/logs/puppet/masterhttp.log
masterlog = /home/logs/puppet/puppetmaster.log
reports = log,foreman 
reports=foreman,log
templatedir = /etc/puppet/templates
node_terminus = exec
external_nodes = /etc/puppet/puppet_node_classifier


site.pp:
#node default {
#   exec {"echo 123":
#   path => "/sbin:/usr/bin:/usr/sbin:/bin",
#   }
#}

#node /local-web-cdn-70-200.idc.test.cn/ {
#include tools
#}

run script:
[root@puppetmaster-tools yaml]# sh  /etc/puppet/puppet_node_classifier 
local-web-cdn-70-200.idc.test.cn
---
environment: production
classes: 
  - tools

Permission :
[root@puppetmaster-tools yaml]# ll  /etc/puppet/puppet_node_classifier 
-rwxr-xr-x 1 root root 133 Feb 20 20:01 /etc/puppet/puppet_node_classifier


but agent cat not running:
-bash-3.2# puppetd --test  
err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find default node or by name with 
'local-web-cdn-70-200.idc.test.cn, local-web-cdn-70-200.idc.test, 
local-web-cdn-70-200.idc, local-web-cdn-70-200' on node 
local-web-cdn-70-200.idc.test.cn
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run


if  cancel exegesis site.pp ,it work ok, how ?

-- 
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+unsubscr...@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread iamauser
Yep... Typo indeed... It all works now... 

Thanks for your patience It now prints out the notification in the 
class dyd::agents... 


Cheers



On Thursday, January 10, 2013 5:42:57 PM UTC-6, Gary Larizza wrote:
>
>
>
>
> On Thu, Jan 10, 2013 at 3:36 PM, Gary Larizza 
> 
> > wrote:
>
>>
>>
>>
>> On Thu, Jan 10, 2013 at 3:18 PM, iamauser 
>> > wrote:
>>
>>> Running puppet agent with a blank node default didn't throw any error 
>>> and prints out the notification. I get this message when puppet agent runs 
>>> on 'node_name'.
>>>
>>> Notice: I AM DEFAULTing...
>>> Notice: /Stage[main]//Node[default]/Notify[I AM DEFAULTing...]/message: 
>>> defined 'message' as 'I AM DEFAULTing...'
>>>
>>> I tried to give another notify message in one of the classes 
>>> (dyd::agents), but it didn't print that out. So it is definitely not 
>>> considering the policies defined in that class.
>>>
>>> Just to note, without the ENC, include dyd::agents in site.pp works and 
>>> propagate the policies and prints the notification.
>>>
>>>
>>>
>> Ahh,
>>
>> I think I see something.  Looking at this:
>>
>> ---
>> environment: production
>> classes:
>>defaultcls:
>>dyd::agents:
>>
>> It looks like the classes are being listed as hashes without values, and 
>> not as an array of class names.  How are you generating this YAML?  It 
>> should be displaying like:
>>  
>> ---
>> environment:
>> classes:
>>   - defaultcls
>>   - dyd::agents
>>
>> (note the dashes)  When you ORIGINALLY gave us the output, it was being 
>> output correctly, but when you pasted the output when you run the ENC as 
>> the puppet user, it seems to be incorrect.  ENCs can pass parameters for 
>> class declarations like so:
>>
>>
> Also, I'm wrong on this ^^; I just tested it out and it DOES work.  You 
> can pass class values as a hash.  So disregard this comment
>  
>
>> ---
>> environment: production
>> classes:
>>defaultcls:
>>  parameter: value
>>dyd::agents:
>>  parameter: value
>>
>> ...but the fact that you're not passing parameters may be messing with 
>> Puppet (I'm going off the top of my head without validating this, so please 
>> someone else speak up if what I'm saying is not entirely true).
>>  
>>
>>
>> -Thanks
>>>
>>>
>>>
>>> On Thursday, January 10, 2013 5:02:08 PM UTC-6, Gary Larizza wrote:
>>>



 On Thu, Jan 10, 2013 at 2:56 PM, iamauser  wrote:

> Hi,
>
> Here is the output. Sorry I didn't get it the first time :)
>
> ]# su -s /bin/sh puppet -c "/usr/local/bin/enclassifier node_name"
> ---
> environment: production
> classes:
>defaultcls:
>dyd::agents:
>

 Cool.  Okay, so you said initially that site.pp exists, but it's blank 
 - there's no default node at all.  Have you tried creating a blank default 
 node declaration (or one with a simple notify statement) to debug what's 
 going on?  I'd do that next just to rule out a missing default node 
 causing 
 issues (I know there was a bug awhile back where Puppet threw a fit 
 whenever it didn't find a default node declaration, but I can't remember 
 how it was resolved).

  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Puppet Users" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/puppet-users/-/dcC_pakJNe0J.
>>>
>>> To post to this group, send email to puppet...@googlegroups.com
>>> .
>>> To unsubscribe from this group, send email to 
>>> puppet-users...@googlegroups.com .
>>> For more options, visit this group at 
>>> http://groups.google.com/group/puppet-users?hl=en.
>>>
>>
>>
>>
>> -- 
>> Gary Larizza
>> Professional Services Engineer 
>>
>
>
>
> -- 
> Gary Larizza
> Professional Services Engineer 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/2bI1gLc5m5MJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread Gary Larizza
On Thu, Jan 10, 2013 at 3:36 PM, Gary Larizza  wrote:

>
>
>
> On Thu, Jan 10, 2013 at 3:18 PM, iamauser  wrote:
>
>> Running puppet agent with a blank node default didn't throw any error and
>> prints out the notification. I get this message when puppet agent runs on
>> 'node_name'.
>>
>> Notice: I AM DEFAULTing...
>> Notice: /Stage[main]//Node[default]/Notify[I AM DEFAULTing...]/message:
>> defined 'message' as 'I AM DEFAULTing...'
>>
>> I tried to give another notify message in one of the classes
>> (dyd::agents), but it didn't print that out. So it is definitely not
>> considering the policies defined in that class.
>>
>> Just to note, without the ENC, include dyd::agents in site.pp works and
>> propagate the policies and prints the notification.
>>
>>
>>
> Ahh,
>
> I think I see something.  Looking at this:
>
> ---
> environment: production
> classes:
>defaultcls:
>dyd::agents:
>
> It looks like the classes are being listed as hashes without values, and
> not as an array of class names.  How are you generating this YAML?  It
> should be displaying like:
>
> ---
> environment:
> classes:
>   - defaultcls
>   - dyd::agents
>
> (note the dashes)  When you ORIGINALLY gave us the output, it was being
> output correctly, but when you pasted the output when you run the ENC as
> the puppet user, it seems to be incorrect.  ENCs can pass parameters for
> class declarations like so:
>
>
Also, I'm wrong on this ^^; I just tested it out and it DOES work.  You can
pass class values as a hash.  So disregard this comment


> ---
> environment: production
> classes:
>defaultcls:
>  parameter: value
>dyd::agents:
>  parameter: value
>
> ...but the fact that you're not passing parameters may be messing with
> Puppet (I'm going off the top of my head without validating this, so please
> someone else speak up if what I'm saying is not entirely true).
>
>
>
> -Thanks
>>
>>
>>
>> On Thursday, January 10, 2013 5:02:08 PM UTC-6, Gary Larizza wrote:
>>
>>>
>>>
>>>
>>> On Thu, Jan 10, 2013 at 2:56 PM, iamauser  wrote:
>>>
 Hi,

 Here is the output. Sorry I didn't get it the first time :)

 ]# su -s /bin/sh puppet -c "/usr/local/bin/enclassifier node_name"
 ---
 environment: production
 classes:
defaultcls:
dyd::agents:

>>>
>>> Cool.  Okay, so you said initially that site.pp exists, but it's blank -
>>> there's no default node at all.  Have you tried creating a blank default
>>> node declaration (or one with a simple notify statement) to debug what's
>>> going on?  I'd do that next just to rule out a missing default node causing
>>> issues (I know there was a bug awhile back where Puppet threw a fit
>>> whenever it didn't find a default node declaration, but I can't remember
>>> how it was resolved).
>>>
>>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/puppet-users/-/dcC_pakJNe0J.
>>
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>
>
> --
> Gary Larizza
> Professional Services Engineer
>



-- 
Gary Larizza
Professional Services Engineer

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread Gary Larizza
On Thu, Jan 10, 2013 at 3:38 PM, iamauser  wrote:

> I guess I figured it out after looking at the PuppetlabConf video on
> youtube :)
> Need to restart the puppetmaster. There was a laugh about during in the
> talk !huh!
>
> It doesn't solve my problem though. It now ends up with another error.
> First warning and then error :
>
> ]$ sudo puppet agent --server=puppet --no-daemonize --verbose --onetime
> Warning: Unable to fetch my node definition, but the agent run will
> continue:
> Warning: Error 400 on SERVER: Failed to find node_name via exec: Execution
> of '/usr/loca/bin/enclassifier node_name' returned 1:
> 
> 
> 
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Failed when searching for node node_name: Failed to find node_name via
> exec: Execution of '/usr/loca/bin/enclassifier node_name' returned 1:
>

^^ Note the typo for /usr/LOCAL  :)


>
> Here 'node_name' is the full fqdn of the node. Should the
> /usr/local/bin/enclassifier and the node_name.yaml be defined in the
> node_name as well ?
>
>
> -Thanks
>
>
>
>
>>>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/h5ehR71VNiMJ.
>
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Gary Larizza
Professional Services Engineer

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread iamauser
I guess I figured it out after looking at the PuppetlabConf video on 
youtube :)
Need to restart the puppetmaster. There was a laugh about during in the 
talk !huh! 

It doesn't solve my problem though. It now ends up with another error. 
First warning and then error :

]$ sudo puppet agent --server=puppet --no-daemonize --verbose --onetime
Warning: Unable to fetch my node definition, but the agent run will 
continue:
Warning: Error 400 on SERVER: Failed to find node_name via exec: Execution 
of '/usr/loca/bin/enclassifier node_name' returned 1: 



Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Failed when searching for node node_name: Failed to find node_name via 
exec: Execution of '/usr/loca/bin/enclassifier node_name' returned 1: 

Here 'node_name' is the full fqdn of the node. Should the 
/usr/local/bin/enclassifier and the node_name.yaml be defined in the 
node_name as well ?


-Thanks




>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/h5ehR71VNiMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread Gary Larizza
On Thu, Jan 10, 2013 at 3:18 PM, iamauser  wrote:

> Running puppet agent with a blank node default didn't throw any error and
> prints out the notification. I get this message when puppet agent runs on
> 'node_name'.
>
> Notice: I AM DEFAULTing...
> Notice: /Stage[main]//Node[default]/Notify[I AM DEFAULTing...]/message:
> defined 'message' as 'I AM DEFAULTing...'
>
> I tried to give another notify message in one of the classes
> (dyd::agents), but it didn't print that out. So it is definitely not
> considering the policies defined in that class.
>
> Just to note, without the ENC, include dyd::agents in site.pp works and
> propagate the policies and prints the notification.
>
>
>
Ahh,

I think I see something.  Looking at this:

---
environment: production
classes:
   defaultcls:
   dyd::agents:

It looks like the classes are being listed as hashes without values, and
not as an array of class names.  How are you generating this YAML?  It
should be displaying like:

---
environment:
classes:
  - defaultcls
  - dyd::agents

(note the dashes)  When you ORIGINALLY gave us the output, it was being
output correctly, but when you pasted the output when you run the ENC as
the puppet user, it seems to be incorrect.  ENCs can pass parameters for
class declarations like so:

---
environment: production
classes:
   defaultcls:
 parameter: value
   dyd::agents:
 parameter: value

...but the fact that you're not passing parameters may be messing with
Puppet (I'm going off the top of my head without validating this, so please
someone else speak up if what I'm saying is not entirely true).



-Thanks
>
>
>
> On Thursday, January 10, 2013 5:02:08 PM UTC-6, Gary Larizza wrote:
>
>>
>>
>>
>> On Thu, Jan 10, 2013 at 2:56 PM, iamauser  wrote:
>>
>>> Hi,
>>>
>>> Here is the output. Sorry I didn't get it the first time :)
>>>
>>> ]# su -s /bin/sh puppet -c "/usr/local/bin/enclassifier node_name"
>>> ---
>>> environment: production
>>> classes:
>>>defaultcls:
>>>dyd::agents:
>>>
>>
>> Cool.  Okay, so you said initially that site.pp exists, but it's blank -
>> there's no default node at all.  Have you tried creating a blank default
>> node declaration (or one with a simple notify statement) to debug what's
>> going on?  I'd do that next just to rule out a missing default node causing
>> issues (I know there was a bug awhile back where Puppet threw a fit
>> whenever it didn't find a default node declaration, but I can't remember
>> how it was resolved).
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/dcC_pakJNe0J.
>
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Gary Larizza
Professional Services Engineer

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread iamauser
Running puppet agent with a blank node default didn't throw any error and 
prints out the notification. I get this message when puppet agent runs on 
'node_name'.

Notice: I AM DEFAULTing...
Notice: /Stage[main]//Node[default]/Notify[I AM DEFAULTing...]/message: 
defined 'message' as 'I AM DEFAULTing...'

I tried to give another notify message in one of the classes (dyd::agents), 
but it didn't print that out. So it is definitely not considering the 
policies defined in that class.

Just to note, without the ENC, include dyd::agents in site.pp works and 
propagate the policies and prints the notification.


-Thanks



On Thursday, January 10, 2013 5:02:08 PM UTC-6, Gary Larizza wrote:
>
>
>
>
> On Thu, Jan 10, 2013 at 2:56 PM, iamauser 
> > wrote:
>
>> Hi,
>>
>> Here is the output. Sorry I didn't get it the first time :)
>>
>> ]# su -s /bin/sh puppet -c "/usr/local/bin/enclassifier node_name"
>> ---
>> environment: production
>> classes:
>>defaultcls:
>>dyd::agents:
>>
>
> Cool.  Okay, so you said initially that site.pp exists, but it's blank - 
> there's no default node at all.  Have you tried creating a blank default 
> node declaration (or one with a simple notify statement) to debug what's 
> going on?  I'd do that next just to rule out a missing default node causing 
> issues (I know there was a bug awhile back where Puppet threw a fit 
> whenever it didn't find a default node declaration, but I can't remember 
> how it was resolved).
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/dcC_pakJNe0J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread Gary Larizza
On Thu, Jan 10, 2013 at 2:56 PM, iamauser  wrote:

> Hi,
>
> Here is the output. Sorry I didn't get it the first time :)
>
> ]# su -s /bin/sh puppet -c "/usr/local/bin/enclassifier node_name"
> ---
> environment: production
> classes:
>defaultcls:
>dyd::agents:
>

Cool.  Okay, so you said initially that site.pp exists, but it's blank -
there's no default node at all.  Have you tried creating a blank default
node declaration (or one with a simple notify statement) to debug what's
going on?  I'd do that next just to rule out a missing default node causing
issues (I know there was a bug awhile back where Puppet threw a fit
whenever it didn't find a default node declaration, but I can't remember
how it was resolved).


>
>
> Thanks
>
>
> On Thursday, January 10, 2013 4:36:14 PM UTC-6, Gary Larizza wrote:
>>
>>
>>
>>
>> On Thu, Jan 10, 2013 at 2:13 PM, iamauser  wrote:
>>
>>> On Thursday, January 10, 2013 4:07:45 PM UTC-6, Gary Larizza wrote:
>>>
 What happens when you run `/usr/local/bin/enclassifier node_name`as
 the puppet user?


>>>
>>> This is what it prints out if I run it on puppet-server.
>>>
>>> ~]# /usr/local/bin/enclassfier node_name
>>> ---
>>> environment:
>>> classes:
>>>   - defaultcls
>>>   - dyd::agents
>>>
>>>
>> What user were you using to run that command?  I see the hash, so I
>> assume it's root.  Try running this as the 'puppet' user - does it spit out
>> the same thing?  Remember that Puppet runs the script as the user which is
>> running the puppet master service (which is usually 'puppet').  I just want
>> to clarify this before we go on :)
>>
>>
>>> To cross check whether puppetmaster is reading the external_nodes
>>> correctly, I tried the following command :
>>>
>>> ~]# puppet master --configprint external_nodes node_name
>>> /usr/local/bin/enclassifier
>>>
>>> Thanks
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/puppet-users/-/**a0P6X7DjuOQJ
>>> .
>>>
>>> To post to this group, send email to puppet...@googlegroups.com.
>>> To unsubscribe from this group, send email to puppet-users...@**
>>> googlegroups.com.
>>>
>>> For more options, visit this group at http://groups.google.com/**
>>> group/puppet-users?hl=en
>>> .
>>>
>>
>>
>>
>> --
>> Gary Larizza
>> Professional Services Engineer
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/mkZL7rwW1AgJ.
>
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Gary Larizza
Professional Services Engineer

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread iamauser
Hi,

Here is the output. Sorry I didn't get it the first time :)

]# su -s /bin/sh puppet -c "/usr/local/bin/enclassifier node_name"
---
environment: production
classes:
   defaultcls:
   dyd::agents:


Thanks


On Thursday, January 10, 2013 4:36:14 PM UTC-6, Gary Larizza wrote:
>
>
>
>
> On Thu, Jan 10, 2013 at 2:13 PM, iamauser 
> > wrote:
>
>> On Thursday, January 10, 2013 4:07:45 PM UTC-6, Gary Larizza wrote:
>>
>>> What happens when you run `/usr/local/bin/enclassifier node_name`as the 
>>> puppet user? 
>>>
>>>
>>  
>> This is what it prints out if I run it on puppet-server.
>>
>> ~]# /usr/local/bin/enclassfier node_name
>> ---
>> environment:
>> classes:
>>   - defaultcls
>>   - dyd::agents
>>
>>
> What user were you using to run that command?  I see the hash, so I assume 
> it's root.  Try running this as the 'puppet' user - does it spit out the 
> same thing?  Remember that Puppet runs the script as the user which is 
> running the puppet master service (which is usually 'puppet').  I just want 
> to clarify this before we go on :)
>  
>
>> To cross check whether puppetmaster is reading the external_nodes 
>> correctly, I tried the following command :
>>
>> ~]# puppet master --configprint external_nodes node_name
>> /usr/local/bin/enclassifier
>>
>> Thanks
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/puppet-users/-/a0P6X7DjuOQJ.
>>
>> To post to this group, send email to puppet...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> puppet-users...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>
>
> -- 
> Gary Larizza
> Professional Services Engineer 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/mkZL7rwW1AgJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread Gary Larizza
On Thu, Jan 10, 2013 at 2:13 PM, iamauser  wrote:

> On Thursday, January 10, 2013 4:07:45 PM UTC-6, Gary Larizza wrote:
>
>> What happens when you run `/usr/local/bin/enclassifier node_name`as the
>> puppet user?
>>
>>
>
> This is what it prints out if I run it on puppet-server.
>
> ~]# /usr/local/bin/enclassfier node_name
> ---
> environment:
> classes:
>   - defaultcls
>   - dyd::agents
>
>
What user were you using to run that command?  I see the hash, so I assume
it's root.  Try running this as the 'puppet' user - does it spit out the
same thing?  Remember that Puppet runs the script as the user which is
running the puppet master service (which is usually 'puppet').  I just want
to clarify this before we go on :)


> To cross check whether puppetmaster is reading the external_nodes
> correctly, I tried the following command :
>
> ~]# puppet master --configprint external_nodes node_name
> /usr/local/bin/enclassifier
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/a0P6X7DjuOQJ.
>
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Gary Larizza
Professional Services Engineer

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread iamauser
On Thursday, January 10, 2013 4:07:45 PM UTC-6, Gary Larizza wrote:

> What happens when you run `/usr/local/bin/enclassifier node_name`as the 
> puppet user? 
>
>
 
This is what it prints out if I run it on puppet-server.

~]# /usr/local/bin/enclassfier node_name
---
environment:
classes:
  - defaultcls
  - dyd::agents

To cross check whether puppetmaster is reading the external_nodes 
correctly, I tried the following command :

~]# puppet master --configprint external_nodes node_name
/usr/local/bin/enclassifier

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/a0P6X7DjuOQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread Gary Larizza
What happens when you run `/usr/local/bin/enclassifier node_name`as the
puppet user?


On Thu, Jan 10, 2013 at 1:41 PM, iamauser  wrote:

> Hello,
>
> I am trying to set up a simple ENC, but definitely missing pieces because
> of which the client data is not propagated to the master. Any help is
> appreciated. Here is what I do after following some of puppetlab docs
> (which is not very verbose TBH) :
>
> In the puppet-master the yaml containing client data is sitting in,
>
> /var/lib/enc/node_name.yaml
>
> contains,
>
> ~]# /usr/local/bin/enclassfier node_name
> ---
> environment:
> classes:
>   - defaultcls
>   - dyd::agents
>
> /usr/local/bin/enclassifier is a simple bash script that catenate the
> content of "node_name.yaml".
>
> puppet.conf on the puppet-master contains these two extra lines :
>
> node_terminus = exec
> external_nodes = /usr/local/bin/enclassifier
>
> site.pp is made empty with no node definition for node 'node_name'.
>
> Now running puppet agent on "node_name" ends up with the following error :
>
> puppet agent --server=puppet --onetime --verbose --no-daemonize
> 
> 
> 
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Could not find default node or by name with 'node_name' on node node_name
>
>
> What is missing in this configuration ?
>
> Thanks for any suggestion or any pointer to a good example set.
>
>
>
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/neMgoYbIwa8J.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Gary Larizza
Professional Services Engineer

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Help needed in setting up a simple ENC

2013-01-10 Thread iamauser
Hello,

I am trying to set up a simple ENC, but definitely missing pieces because 
of which the client data is not propagated to the master. Any help is 
appreciated. Here is what I do after following some of puppetlab docs 
(which is not very verbose TBH) :

In the puppet-master the yaml containing client data is sitting in,

/var/lib/enc/node_name.yaml

contains,

~]# /usr/local/bin/enclassfier node_name
---
environment:
classes:
  - defaultcls
  - dyd::agents

/usr/local/bin/enclassifier is a simple bash script that catenate the 
content of "node_name.yaml".

puppet.conf on the puppet-master contains these two extra lines :

node_terminus = exec
external_nodes = /usr/local/bin/enclassifier

site.pp is made empty with no node definition for node 'node_name'.

Now running puppet agent on "node_name" ends up with the following error :

puppet agent --server=puppet --onetime --verbose --no-daemonize



Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find default node or by name with 'node_name' on node node_name


What is missing in this configuration ? 

Thanks for any suggestion or any pointer to a good example set.







-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/neMgoYbIwa8J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.