Issue #7624 has been updated by Dan Bode.
The following code from Puppet::Type.instances looks like it may be the cause
of this:
<pre>
def self.instances raise Puppet::DevError, "#{self.name} has no providers
and has not overridden '
instances'" if provider_hash.empty?
# Put the default provider first, then the rest of the suitable providers.
provider_instances = {}
providers_by_source.collect do |provider|
provider.instances.collect do |instance|
# We always want to use the "first" provider instance we find, unless
the r
esource # is already managed and has a different provider set
if other = provider_instances[instance.name]
Puppet.warning "%s %s found in both %s and %s; skipping the %s
version" %
[self.name.to_s.capitalize, instance.name, other.class.name,
instance.c
lass.name, instance.class.name]
next
end
provider_instances[instance.name] = instance
new(:name => instance.name, :provider => instance, :audit => :all)
end
end.flatten.compact
end
</pre>
note that it sets the new type instances to :audit => :all by default
----------------------------------------
Bug #7624: resource purging causes audit messages
https://projects.puppetlabs.com/issues/7624
Author: Dan Bode
Status: Accepted
Priority: High
Assignee:
Category:
Target version: 2.6.x
Affected Puppet version: 2.6.5
Keywords:
Branch:
Given the code:
<pre>
resources { 'host':
purge => true
}
host { 'foo':
ip => '127.0.0.2'
}
</pre>
when removing state yaml and running puppet apply it logs several audit events:
<pre>
rm /var/lib/puppet/state/state.yaml
# puppet apply tests/limits.pp --noop
notice: /Host[foop]/ensure: current_value present, should be absent (noop)
notice: /Host[foop]/ensure: audit change: newly-recorded value present
notice: /Host[foop]/ip: audit change: newly-recorded value 127.0.0.2
notice: /Host[foop]/host_aliases: audit change: newly-recorded value absent
notice: /Host[foop]/comment: audit change: newly-recorded value
notice: /Host[foop]/target: audit change: newly-recorded value /etc/hosts
notice: /Host[danshost]/ensure: current_value present, should be absent (noop)
notice: /Host[danshost]/ensure: audit change: newly-recorded value present
notice: /Host[danshost]/ip: audit change: newly-recorded value 127.0.0.2
notice: /Host[danshost]/host_aliases: audit change: newly-recorded value absent
notice: /Host[danshost]/comment: audit change: newly-recorded value
notice: /Host[danshost]/target: audit change: newly-recorded value /etc/hosts
notice: /Host[localhost6.localdomain6]/ensure: current_value present, should be
absent (noop)
notice: /Host[localhost6.localdomain6]/ensure: audit change: newly-recorded
value present
notice: /Host[localhost6.localdomain6]/ip: audit change: newly-recorded value
::1
notice: /Host[localhost6.localdomain6]/host_aliases: audit change:
newly-recorded value localhost6
notice: /Host[localhost6.localdomain6]/comment: audit change: newly-recorded
value
notice: /Host[localhost6.localdomain6]/target: audit change: newly-recorded
value /etc/hosts
notice: /Host[localhost.localdomain]/ensure: current_value present, should be
absent (noop)
notice: /Host[localhost.localdomain]/ensure: audit change: newly-recorded value
present
notice: /Host[localhost.localdomain]/ip: audit change: newly-recorded value
127.0.0.1
notice: /Host[localhost.localdomain]/host_aliases: audit change: newly-recorded
value
localhostpuppetmasterpuppetagentpuppetmaster.localdomainpuppetagent.localdomainpuppet
notice: /Host[localhost.localdomain]/comment: audit change: newly-recorded
value
notice: /Host[localhost.localdomain]/target: audit change: newly-recorded value
/etc/hosts
notice: Finished catalog run in 0.06 seconds
</pre>
I have verified that this exists in both 2.7.0rc3, 2.6.8, and 2.6.5,
it does not occur in 2.6.4 (which is consistent with #6443)
--
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.