Issue #8750 has been updated by eric sorenson. Status changed from Accepted to Duplicate
Hi commenters -- there are two issues that are conflated here. The problem with masters not reloading types is an inherent problem of single process Ruby masters and literally cannot be fixed within our current paradigm. The closest workaround is to run a development server which uses apache+passenger with `PassengerMaxRequests 1` to fork a new process for every catalog compilation request. The product direction to fix this is tracked under #12173. The later problem (the puppetmaster doesn't find manifests/modules after adding them to modulepath) is an actual bug that we need help tracking down. We're aggregating all of the related problems under #16568. Since there is no non-duplicate information here I'm going to mark this bug closed as a duplicate. Please transfer your watch and submit any `puppet master --trace` logs to #16568 since that is the one we're struggling to reproduce reliably. ---------------------------------------- Bug #8750: puppetmaster needs restart to pick up on changes in types/providers in modules https://projects.puppetlabs.com/issues/8750#change-89061 * Author: Stijn Hoop * Status: Duplicate * Priority: High * 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 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.
