Issue #7680 has been updated by Emanuel Rietveld.
Take this comment with a heavy grain of salt, since I don't know how to program
in ruby nor do I know the puppet codebase.
My testcase above now passes after I did
<pre>
diff --git a/lib/puppet/type/file/source.rb b/lib/puppet/type/file/source.rb
index 6ebec51..a87b3b7 100755
--- a/lib/puppet/type/file/source.rb
+++ b/lib/puppet/type/file/source.rb
@@ -114,7 +114,7 @@ module Puppet
param_name = (metadata_method == :checksum) ? :content :
metadata_method
next if metadata_method == :owner and !Puppet.features.root?
next if metadata_method == :checksum and metadata.ftype == "directory"
- next if metadata_method == :checksum and metadata.ftype == "link" and
metadata.links == :manage
+ next if metadata_method == :checksum and metadata.ftype == "link" and
resource[:links] == :manage
if resource[param_name].nil? or resource[param_name] == :absent
resource[param_name] = metadata.send(metadata_method)
</pre>
Tried to apply some other manifests and didn't get any unexpected results.
----------------------------------------
Bug #7680: Checksum missmatch when copying followed symlinks
https://projects.puppetlabs.com/issues/7680
Author: Mikael Svantesson
Status: Accepted
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version: 2.6.8
Keywords: symlink file
Branch:
When trying to copy a file (using a symlink), Puppet does not calculate the
correct checksum for the temporary file.
This work in 2.6.7, I have not tried 2.7.x.
**Error:**
err: /Stage[pre]/Sudo/File[/etc/sudoers]/ensure: change from absent to
present failed: Could not rename temporary file /etc/sudoers.puppettmp_4293 to
/etc/sudoers:
File written to disk did not match checksum; discarding changes ( vs
{md5}d41d8cd98f00b204e9800998ecf8427e) at
/etc/puppet/modules/sudo/manifests/init.pp:12 at
/etc/puppet/modules/sudo/manifests/init.pp:12
**Manifest:**
class sudo {
package { 'sudo': ensure => installed }
file { '/etc/sudoers':
ensure => file,
source => ["puppet:///modules/sudo/sudoers-${hostname}",
'puppet:///modules/sudo/sudoers'],
links => follow,
replace => true,
owner => 'root',
group => 'root',
mode => '0440',
}
}
**File structure:**
modules/sudo/files
|-- sudoers
|-- sudoers-host1
`-- sudoers-host2 -> sudoers-host1
--
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.