Issue #8750 has been updated by Stijn Hoop. File master-20110919-firstrun.log added File agent-20110919-firstparameter.log added File agent-20110919-secondparameter.log added File master-20110919-secondrun.log added File agent-20110919-secondparameter-try2.log added
Finally more feedback. Sorry for the delay. I have now installed puppet 2.7.3 from the RPMs provided by M. Stahnke. The server is still running CentOS 5, the client is Fedora 14. Server is simply 'puppet master', no apache / passenger setup. The above sequence of events is still completely the same: - start master, custom type with one parameter present - start agent, run completes just fine - edit type to include a second parameter (on the master, but in practice this would be a 'git push' or something) - do NOT restart master - start agent for the second time, run FAILS because the master does not reload the type and barfs on the second parameter - restart master without changing anything else - start agent again, this time run succeeds I will attach the same logfiles as previous, for 2.7.x. To summarize what I think is a problem: I cannot update the code for module 'foo' to include an extra parameter without having to restart the puppet master. This means that I have to unconditionally restart the puppet master whenever code in /a/ module changes, in order to guarantee future correct puppet runs. I supppose that the server needs to reload the code for custom types whenever it detects a change on-disk, if that was not already the intent. ---------------------------------------- Bug #8750: puppetmaster needs restart to pick up on changes in types/providers in modules https://projects.puppetlabs.com/issues/8750 Author: Stijn Hoop Status: Duplicate Priority: Normal Assignee: Nigel Kersten Category: modules Target version: Affected Puppet version: 2.6.9 Keywords: Branch: 2.6.x Unexpectedly to me, it seems that my puppet master is NOT reloading changed code in modules, resulting in a failed run on the agents even though they do receive the new code. Given the following configuration on the master: [unixhelp@pclinvir027] </etc/puppet> sudo puppet master --configprint modulepath /etc/puppet/modules:/usr/share/puppet/modules [unixhelp@pclinvir027] </etc/puppet> sudo puppet master --configprint manifest /etc/puppet/manifests/site.pp [unixhelp@pclinvir027] </etc/puppet> cat puppet.conf [main] logdir = /var/log/puppet rundir = /var/run/puppet ssldir = $vardir/ssl # Enable syncing of plugin code pluginsync = true [agent] classfile = $vardir/classes.txt localconfig = $vardir/localconfig [master] certname = pclinvir027.win.tue.nl [unixhelp@pclinvir027] </etc/puppet> tree manifests modules manifests `-- site.pp modules `-- foo |-- lib | `-- puppet | |-- provider | | `-- footype | | `-- footype.rb | `-- type | `-- footype.rb `-- manifests `-- init.pp [unixhelp@pclinvir027] </etc/puppet> cat modules/foo/lib/puppet/type/footype.rb Puppet::Type.newtype(:footype) do @doc = "Testing puppetmaster type reload" newparam(:name) do desc "Name of the type" isnamevar end newparam(:testing) do desc "The first parameter" end end [unixhelp@pclinvir027] </etc/puppet> cat modules/foo/lib/puppet/provider/footype Puppet::Type.type(:footype).provide(:footype) do desc "Testing puppet master reload" end [unixhelp@pclinvir027] </etc/puppet> cat modules/foo/manifests/init.pp class foo { footype { "test": testing => 1, } } And this puppet.conf on the client: [unixhelp@pclinvir028 ~]$ cat /etc/puppet/puppet.conf [main] logdir = /var/log/puppet rundir = /var/run/puppet ssldir = $vardir/ssl # Enable syncing of plugin code pluginsync = true [agent] classfile = $vardir/classes.txt localconfig = $vardir/localconfig The following sequence of events reproduces the problem: Start the master: $ sudo puppet master --debug --no-daemonize --verbose Start the agent for the first time: $ sudo puppet agent --debug --no-daemonize --verbose --onetime --server pclinvir027.win.tue.nl Output is in agent-20110803-firstparameter.log. It works fine, code gets synced, etc. Now edit the code in /etc/puppet/modules/foo/lib/puppet/{type/footype.rb,manifests/init.pp} to include a new parameter: [unixhelp@pclinvir027] </etc/puppet> cat modules/foo/lib/puppet/type/footype.rb Puppet::Type.newtype(:footype) do @doc = "Testing puppetmaster type reload" newparam(:name) do desc "Name of the type" isnamevar end newparam(:testing) do desc "The first parameter" end newparam(:testingagain) do desc "The second parameter" end end [unixhelp@pclinvir027] </etc/puppet> cat modules/foo/manifests/init.pp class foo { footype { "test": testing => 1, testingagain => 2, } } Start the agent again: $ sudo puppet agent --debug --no-daemonize --verbose --onetime --server pclinvir027.win.tue.nl Output is in agent-20110803-firstparameter.log. We get an error because the server cannot validate the catalog. On the server console we see: debug: Automatically imported foo from foo into production err: Invalid parameter testingagain at /etc/puppet/modules/foo/manifests/init.pp:5 on node pclinvir028.win.tue.nl The output from the master so far is in master-20110803-firstrun.log. WITHOUT CHANGING ANYTHING, restart the puppet master. Run the agent for the 3rd time, and see that it now works: agent-20110803-secondparameter-try2.log. So it seems to me that types/providers in modules are not being reloaded. This is puppet 2.6.9 on CentOS 5, installed from Todd Zulinger's RPM repository. -- 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.
