Issue #16568 has been updated by Roman Chyla.
Hi, I have experienced the same issue now, and restarting puppetmaster helped
to solve it (before restarting, I tried `puppet module install puppetlabs-apt`
hoping the server would get refreshed, but nope).
<pre>
[test@puppet0 modules]$ puppet --version
3.1.0
</pre>
This was the message
<pre>
[root@puppet0 ~]# puppet agent --test
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
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 jenkins at /etc/puppet/manifests/site.pp:85 on node puppet1
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
</pre>
I have just installed open source puppet on CentOs6.3, checked out jenkins
plugin from source
<pre>
cd /etc/puppet/modules
sudo git clone git://github.com/rtyler/puppet-jenkins.git jenkins
[test@puppet0 modules]$ sudo puppet module list
/etc/puppet/modules
├── jenkins (???)
├── puppetlabs-apt (v1.1.0)
└── puppetlabs-stdlib (v3.2.0)
/usr/share/puppet/modules (no modules installed)
</pre>
and this is what i have inside site.pp
<pre>
node 'puppet1' inherits 'server.base' {
# this installs jenkins, lts=long term support version
class {'jenkins':
lts => 1,
repo => 0,
}
# install jenkins plugins
jenkins::plugin {
"git" : ;
"backup": ;
#"subversion": ;
"parameterized-trigger": ;
"mongodb": ;
"envinject": ;
}
# make sure that the jenkins user has bash as a default shell
user {'jenkins':
shell => '/bin/bash',
require => Class['jenkins'],
}
}
</pre>
this is my agent config
<pre>
[root@puppet0 ~]# cat /etc/puppet/puppet.conf
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
report=true
server=puppet0
pluginsync=true
certname=puppet1
[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
[master]
server=puppet0
</pre>
and this the server's config
<pre>
[test@puppet0 modules]$ cat /etc/puppet/puppet.conf
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
report=true
server=puppet0
pluginsync=true
[master]
certname = puppet0
certdnsnames = puppet0
[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
</pre>
HTH
----------------------------------------
Bug #16568: Modules added to modulepath aren't recognized until service restart
https://projects.puppetlabs.com/issues/16568#change-83765
Author: Ryan Coleman
Status: Rejected
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.