FAQ
We use puppet with two environments: [main] and [development]. These
environments have different locations for their puppet manifests and
modules (see puppet.conf below). Whenever I change/update a file in the
directories belonging to the “main” environment, puppetmaster notices these
changes and reacts to them w/o any hiccups.

In contrast to this – if I change/touch a file in a directory belonging to
the [development] environment (e. g. by doing “touch
/opt/xxx/dev/puppet/manifests/site.pp”) – this will result in errors of the
following kind:

puppet-master[13904]: Cannot find definition Class on node <nodeX>
puppet-master[13904]: Could not find class xxx::thirdparty for <nodeY> on
node <nodeY>
puppet-master[13904]: (//<nodeZ>/Puppet) Could not retrieve catalog from
remote server: Error 400 on SERVER: Cannot find definition Class on node
<nodeZ>

puppet-master[13904]: (//<nodeZ>/Puppet) Using cached catalog

This happens *exactly once* for (I believe) every [development] agent.
Agents react to this by using their last cached catalog. When they request
a new catalog *the next time – everything works like a charm.*

After running puppet master in a bit more verbose way (—verbose —debug
—trace —no-daemonize) I’ve spotted errors of the following two kinds in the
log. Apart from their first 3 lines these stack traces are identical.


Error: Cannot find definition Class on node <nodeB>
/usr/lib/ruby/site_ruby/1.8/puppet/util/errors.rb:60:in `fail'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/resource.rb:87:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:165:in
`evaluate_classes'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:150:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:150:in
`evaluate_classes'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/include.rb:11:in
`real_function_include'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:146:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:146:in
`function_include'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:31:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:31:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:25:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:20:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:20:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/type.rb:136:in `evaluate_code'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/resource.rb:81:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:165:in
`evaluate_classes'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:150:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:150:in
`evaluate_classes'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/include.rb:11:in
`real_function_include'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:146:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:146:in
`function_include'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:31:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:31:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:25:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:20:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:20:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/type.rb:136:in `evaluate_code'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/resource.rb:81:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:219:in
`evaluate_ast_node'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:98:in `compile'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:29:in `compile'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:76:in
`compile'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:179:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:178:in `benchmark'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:74:in
`compile'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:34:in
`find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:191:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:108:in `do_find'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `process'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick/rest.rb:24:in
`service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:33:in `listen'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `call'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:30:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in
`initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in
`synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:92:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:104:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/daemon.rb:136:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:207:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:157:in
`run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:364:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:456:in `plugin_hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:364:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:504:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:364:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:132:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:86:in `execute'

/usr/bin/puppet:4

… and…

Error: Could not find class <moduleX>::users::sudoers for <nodeA> on node
<nodeA>
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:167:in
`evaluate_classes'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:150:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:150:in
`evaluate_classes'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/include.rb:11:in
`real_function_include'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:146:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:146:in
`function_include'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:31:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:31:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:25:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:20:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:20:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/type.rb:136:in `evaluate_code'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/resource.rb:81:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:165:in
`evaluate_classes'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:150:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:150:in
`evaluate_classes'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/include.rb:11:in
`real_function_include'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:146:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:146:in
`function_include'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:31:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:31:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:25:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:20:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:20:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/type.rb:136:in `evaluate_code'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/resource.rb:81:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:219:in
`evaluate_ast_node'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:98:in `compile'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:29:in `compile'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:76:in
`compile'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:179:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:178:in `benchmark'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:74:in
`compile'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:34:in
`find'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:191:in `find'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:108:in `do_find'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:71:in `process'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick/rest.rb:24:in
`service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:33:in `listen'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `call'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:30:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in
`initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:29:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in
`synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:26:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:92:in `listen'
/usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:104:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/daemon.rb:136:in `start'
/usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:207:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:157:in
`run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:364:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:456:in `plugin_hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:364:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:504:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:364:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:132:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:86:in `execute'

/usr/bin/puppet:4

Some facts about the environment this runs in:

puppet.conf (puppetmaster)
cat /etc/puppet/puppet.conf
[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
modulepath = /opt/xxx/puppet/modules
manifestdir = /opt/xxx/puppet/manifests
manifest = /opt/xxx/puppet/manifests/site.pp
[development]
logdir = /opt/xxx/log/puppet
modulepath = /opt/xxx/dev/puppet/modules
manifestdir = /opt/xxx/dev/puppet/manifests
manifest = /opt/xxx/dev/puppet/manifests/site.pp
[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
server = <some host>
report = true
splaylimit = 0
runinterval = 30
[master]
certname=<some host>
reports = http,log
reportdir = /var/lib/puppet/reports/upload

reporturl = http://<some host>:3000/reports

kernel
uname -r
2.6.32-279.el6.x86_64

OS

cat /etc/redhat-release

CentOS release 6.3 (Final)

packages/versions
rpm -qa | egrep "puppet|ruby"
rubygem-rake-0.8.7-2.1.el6.noarch
ruby-mysql-2.8.2-1.el6.x86_64
libselinux-ruby-2.0.94-5.3.el6.x86_64
puppet-3.1.0-1.el6.noarch
ruby-1.8.7.352-7.el6_2.x86_64
ruby-irb-1.8.7.352-7.el6_2.x86_64
ruby-augeas-0.4.1-1.el6.x86_64
ruby-shadow-1.4.1-13.el6.x86_64
puppetlabs-release-6-6.noarch
rubygems-1.3.7-1.el6.noarch
puppet-dashboard-1.2.21-1.el6.noarch
puppet-server-3.1.0-1.el6.noarch
ruby-libs-1.8.7.352-7.el6_2.x86_64
ruby-rdoc-1.8.7.352-7.el6_2.x86_64

rubygem-json-1.4.6-1.el6.x86_64

Modifying modules/manifests while puppetmaster service is turned off works
w/o any errors.
service puppetmaster stop
Stopping puppetmaster: [ OK ]
touch /opt/xxx/dev/puppet/manifests/site.pp
service puppetmaster start
No errors (except “Could not evaluate: Connection refused” lines by the
agents while puppetmaster is away) in the log when puppetmaster starts. But
I actually don’t want to do this… Because I'm unsure if this is
misuse/misconfiguration or a bug - it's also files here:
http://projects.puppetlabs.com/issues/19538

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMar 6, '13 at 3:00p
activeMar 6, '13 at 3:00p
posts1
users1
websitepuppetlabs.com

1 user in discussion

Christian Le Flamm: 1 post

People

Translate

site design / logo © 2021 Grokbase