Issue #8750 has been updated by Justin Ellison.
I think I'm encountering a variant of this.
I'm using pluginsync to distribute the puppetlabs-firewall module out to
clients to manage iptables rules. When I bring up a new system the following
happens:
1. Puppet client daemon starts
2. All my firewall resources are wrapped with 'if defined(firewall)', and are
skipped on the first run.
3. Still on the first run, a new puppet.conf is pushed to the client with
pluginsync enabled. This triggers a puppet daemon restart on the client.
4. On the 2nd puppet client run, it pulls down puppetlabs-firewall from the
puppet master, so the defined() call returns true. However, all subsequent
resources of type firewall fail with:
err: /Firewall[000 accept all ICMP requests]: Could not evaluate: No
ability to determine if firewall exists
If I restart the puppet client daemon, the next run succeeds. I'm running
2.6.6.
----------------------------------------
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: Accepted
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 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.