Issue #16568 has been updated by Andrew  Parker.

I was able to get something similar. It looks like this is some sort of race 
when a config file gets modified. I've always seen the problem in conjunction 
with a log statement that the config file was modified and will be reloaded.

Steps:

1. install puppet 3
2. install the puppetdb module
3. write a site.pp with
<pre>
node default {
  include puppetdb
  include puppetdb::master::config
}
</pre>
4. setup the puppet.conf so that the agent will talk to a master on the same 
machine
5. start the master using `puppet master --logdest console --debug --trace 
--no-daemonize`
6. edit the puppet.conf file. Add some newlines to the bottom (we just want to 
get it so that the file is detected as changed)
7. run the agent as `puppet agent -t`

The error will not always occur. It only seems to happen if the config file is 
reloaded while the catalog is being compiled. I don't yet know how this is 
happening, since I can't see where the master checks for the file change to 
make a reload happen. The following is the stack trace that I see when this 
occurs (I've more often seen the stack trace start a few lines above the line 
given here):

NOTE: the line numbers in resource.rb are off a little bit because of two lines 
that I added for debugging at lines 216 and 217 (to invoke pry).

<pre>
Config file /etc/puppet/puppet.conf changed; triggering re-parse of all config 
files.
Debug: Automatically imported puppetdb::server::validate_db from 
puppetdb/server/validate_db into production
Debug: importing '/etc/puppet/modules/postgresql/manifests/init.pp' in 
environment production
Debug: importing 
'/etc/puppet/modules/postgresql/manifests/validate_db_connection.pp' in 
environment production
Debug: Automatically imported postgresql::validate_db_connection from 
postgresql/validate_db_connection into production
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid 
resource type postgresql::validate_db_connection at 
/etc/puppet/modules/puppetdb/manifests/server/validate_db.pp:62 on node 
pe-centos6.local
/usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:220:in `initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/resource.rb:120:in `initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:44:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:44:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/util/errors.rb:35:in `exceptwrap'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:43:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:42:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:42:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/module.rb:283:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/branch.rb:16:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/branch.rb:15:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:25:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:25: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/parser/ast/ifstatement.rb:25: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/ast/resource.rb:60:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/util/errors.rb:35:in `exceptwrap'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:43:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:42:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:42:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/lexer.rb:171:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/branch.rb:16:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/branch.rb:15:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:25:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:25: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/ast/resource.rb:60:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/util/errors.rb:35:in `exceptwrap'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:43:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:42:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:42:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:68:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/branch.rb:16:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/branch.rb:15:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:25:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:25: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/ast/resource.rb:60:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/util/errors.rb:35:in `exceptwrap'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:43:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:42:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:42:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/branch.rb:16:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/branch.rb:15:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:25:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/resource.rb:25: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:63:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions.rb:63: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:77: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:75:in 
`compile'
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:35: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:199:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:148:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in `plugin_hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in `execute'
/usr/bin/puppet:10
</pre>
----------------------------------------
Bug #16568: Modules added to modulepath aren't recognized until service restart
https://projects.puppetlabs.com/issues/16568#change-71957

Author: Ryan Coleman
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 3.0.0
Affected Puppet version: 3.0.0-rc8
Keywords: 
Branch: 


Recreating my working environment (in this specific order):

* Use CentOS 6.0
* Install puppet-server 3.0.0-rc7 from puppetlabs-devel yum repository on 
master, puppet 3.0.0-rc7 on agent
* Install puppetdb module -- `puppet module install puppetlabs-puppetdb`
* Start the puppetmaster service
* Declare puppetdb & puppetdb::master::config class on master and run puppet) 
* Install mediawiki module -- `puppet module install martasd-mediawiki`

Declare the mediawiki class for your agent node, 
<pre>
class { 'mediawiki':
  server_name      => 'wiki.puppetlabs.vm',
  admin_email      => '[email protected]',
  db_root_password => 'really_long_password',
  doc_root         => '/var/www',
  max_memory       => '1024'
}
</pre>

* Run Puppet on your agent

I expect you'll run into the error I received. 
<pre>
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find 
declared class mediawiki at /etc/puppet/manifests/site.pp:9 on node 
wiki1.puppetlabs.vm
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
</pre>

Additional info:
<pre>
[root@master modules]# puppet module list
/etc/puppet/modules
├── cprice404-inifile (v0.0.3)
├── inkling-postgresql (v0.3.0)
├── mediawiki (???)
├── puppet-haproxy (v0.0.2)
├── puppetlabs-apache (v0.4.0)
├── puppetlabs-firewall (v0.0.4)
├── puppetlabs-mysql (v0.5.0)
├── puppetlabs-puppetdb (v1.0.3)
├── puppetlabs-stdlib (v3.0.1)
├── ripienaar-concat (v0.2.0)
├── saz-memcached (v2.0.2)
└── stahnma-epel (v0.0.2)
/usr/share/puppet/modules (no modules installed)
[root@master modules]# puppet config print modulepath
/etc/puppet/modules:/usr/share/puppet/modules
</pre>

Problem is resolved by restarting the puppetmaster service. No amount of 
waiting seems to resolve the issue. 



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to