[Puppet Users] how to co-exist ENC and standard node definitions in site.pp?

2013-02-21 Thread serwei2014
In the puppet document has such a word:
ENCs can co-exist with standard node definitions in site.pp, 
and the classes declared in each source are effectively merged. 

but in my test  environment,if not work:

for example(puppet version 2.6.11)

now enable ENC
[root@puppetmaster-tools puppet]# cat /etc/puppet/puppet.conf|tail -3
external_nodes = /etc/puppet/puppet_node_classifier
modulepath = /etc/puppet/modules


site.conf :
node /test.test.cn/ {
include tools
}
#node /local-web-cdn-70-200.idc.test.cn/ {
#class { "tools::test": version => "test" }
#include tools::test
#include test
#}

The result :
node test.test.cn work ok,but node local-web-cdn-70-200.idc.test.cn has 
some error like this:
-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 edit site.pp, for examlpe:
site.conf :
#node /test.test.cn/ {
#include tools
#}
#node /local-web-cdn-70-200.idc.test.cn/ {
#class { "tools::test": version => "test" }
#include tools::test
#include test
#}
two node  work ok,all used ENC 

how to co-exist ENC and standard node definitions in site.pp?

-- 
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.




[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] puppet master processing agent report time is very long, how to optimization

2013-02-07 Thread serwei2014
The puppet conf:
master:
reports = log,foreman 
 
agent:
 report = true
 
So  The foreman is  the bottleneck?  How to optimise?
 

On Thursday, February 7, 2013 10:59:02 AM UTC, Dominic Cleal wrote:

> On 07/02/13 08:30, serwe...@gmail.com  wrote: 
> > There is a puppet cluster, composed by nginx,passenger,puppet. The 
> number of qps is 1000 currently, 
> > and the processing speed of the whole cluster is pretty good,the average 
> processing time for the request is 0.25 seconds. 
> >  But it is a little slow from client report, a lot of processing time is 
> tens of seconds.such 
> > as nginx log: 
> >   
> > 192.168.0.2 puppet  - [07/Feb/2013:15:45:44 +0800] "PUT 
> > /production/report/123.test.test.cn HTTP/1.1" 200 24 "-" "-" "-" 95.690 
> > 192.168.12.12:8140 200 _95.876_ 
>
> Are you using reports for anything? 
>
> By default Puppet enables and stores them.  You can disable storage on 
> your master with: 
>
> [master] 
> reports = 
>
> Or you can disable sending them on your agents with: 
>
> [agent] 
> report = false 
>
> If you're using disk stored reports for something useful, then look at 
> PuppetDB 1.1 instead, or improve your storage.  If you're using another 
> report processor (e.g. Foreman), then you need to optimise that. 
>
> -- 
> Dominic Cleal 
> Red Hat Engineering 
>

-- 
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.




[Puppet Users] puppet master processing agent report time is very long, how to optimization

2013-02-07 Thread serwei2014
 
There is a puppet cluster, composed by nginx,passenger,puppet. The number of 
qps is 1000 currently,
and the processing speed of the whole cluster is pretty good,the average 
processing time for the request is 0.25 seconds.
 But it is a little slow from client report, a lot of processing time is tens 
of seconds.such 
as nginx log:
 
192.168.0.2 puppet  - [07/Feb/2013:15:45:44 +0800] "PUT 
/production/report/123.test.test.cn HTTP/1.1" 200 24 "-" "-" "-" 95.690 
192.168.12.12:8140 200 *95.876*
 
The Normal request:
192.168.0.2 puppet   - [07/Feb/2013:16:03:52 +0800] "GET 
/production/file_metadata/files/123.py HTTP/1.1" 200 324 "-" "-" "-" 0.014 
192.168.12.12:8140 200 0.105
 
puppet version:2.6.11
nginx version:1.0.9
passenger version:3.0.13 and 3.0.17
 
The Server cluster still have not reached the performance bottleneck
 
nginx proxy buffer is large enough
 
passenger conf :
passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17;
passenger_ruby /usr/bin/ruby;
passenger_max_pool_size 150;
passenger_use_global_queue on;
passenger_max_requests 4000;
passenger_pool_idle_time 100;
 
how to optimize?

-- 
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.