Issue #13199 has been updated by BenoƮt Allard.
This is not fixed in 3.x either (at least 3.1.1)
I get the following error:
change from {md5lite}365b7b8a76573d68f6749e61b30f73ea to
{md5}251743dfd3fda414570524bac9e55381 failed: Could not rename temporary file
c:/dotNetFx40_Full_x86_x64.exe.puppettmp_9346 to
c:/dotNetFx40_Full_x86_x64.exe: File written to disk did not match checksum;
discarding changes ({md5lite}251743dfd3fda414570524bac9e55381 vs
{md5lite}365b7b8a76573d68f6749e61b30f73ea)
As you can see, he is comparing the md5lite he calculated (365b...) with the
md5 he got from the server he is handling as a md5lite (2517...) ...
----------------------------------------
Bug #13199: md5lite, mtime not honoured for file type/provider
https://projects.puppetlabs.com/issues/13199#change-94114
* Author: Ken Barber
* Status: Accepted
* Priority: Normal
* Assignee:
* Category: file
* Target version:
* Affected Puppet version: 2.7.20
* Keywords:
* Branch:
----------------------------------------
It seems I can't get the puppetmaster to honour the checksum => mtime setting,
or the md5lite setting. So the following example has no performance improvement
over just using md5:
file { "/testtransfer":
ensure => directory,
recurse => remote,
purge => true,
checksum => mtime,
source => "puppet:///modules/${module_name}/bigfileshere",
}
The problem seems to be in multiple places. The first place, I can't get the
file_server/metadata to respond with mtime, md5lite checksums:
# curl -k --cert /etc/puppetlabs/pupem --key
/etc/puppetlabs/puppet/ssl/private_keys/puppetclient2.vm.pem --cacert
/etc/puppetlabs/puppet/ssl/certs/ca.pem -H 'Accept: yaml'
'https://puppet:8140/production/file_metadatas/modules/filetransfer/sles/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso
checksum_type=md5lite'
---
- !ruby/object:Puppet::FileServing::Metadata
checksum: "{md5}d2e10420f3689faa49a004b60fb396b7"
checksum_type: md5
destination:
expiration: 2012-03-16 17:49:23.600743 -07:00
ftype: file
group: 0
links: !ruby/sym manage
mode: 420
owner: 0
path:
/etc/puppetlabs/puppet/modules/filetransfer/files/sles/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso
relative_path: .
stat_method: !ruby/sym lstat
This is fixed with this patch:
diff --git a/lib/puppet/indirector/file_server.rb
b/lib/puppet/indirector/file_server.rb
index 9516a40..9fbd57e 100644
--- a/lib/puppet/indirector/file_server.rb
+++ b/lib/puppet/indirector/file_server.rb
@@ -51,6 +51,7 @@ class Puppet::Indirector::FileServer <
Puppet::Indirector::Terminus
Puppet::FileServing::Fileset.merge(*filesets).collect do |file,
base_path|
inst = model.new(base_path, :relative_path => file)
inst.links = request.options[:links] if request.options[:links]
+ inst.checksum_type = request.options[:checksum_type] if
request.options[:checksum_type]
inst.collect
inst
end
Which does the correct thing:
# curl -k --cert /etc/puppetlabs/puppet/ssl/certs/puppetclient2.vm.pem
--key /etc/puppetlabs/puppet/ssl/private_keys/puppetclient2.vm.pem --cacert
/etc/puppetlabs/puppet/ssl/certs/ca.pem -H 'Accept: yaml'
'https://puppet:8140/production/file_metadatas/modules/filetransfer/sles/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso?checksum_type=md5lite'
---
- !ruby/object:Puppet::FileServing::Metadata
checksum: "{md5lite}bf619eac0cdf3f68d496ea9344137e8b"
checksum_type: md5lite
destination:
expiration: 2012-03-16 17:51:43.033651 -07:00
ftype: file
group: 0
links: !ruby/sym manage
mode: 420
owner: 0
path:
/etc/puppetlabs/puppet/modules/filetransfer/files/sles/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso
relative_path: .
stat_method: !ruby/sym lstat
The second problem seems to be in the provider itself, it seems to me as if its
still trying to do an md5 scan on the local filesystem - but I'll have to dig
deeper to find the root cause for this.
--
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.
For more options, visit https://groups.google.com/groups/opt_out.