Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 3.4.3, PUP 3.6.2, PUP 3.7.2
-
5
-
Platform Client 2015-01-07, Platform Client 2015-01-21, Client 2015-02-04, Client 2015-02-18
Description
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.
Attachments
Issue Links
- blocks
-
PUP-3891 Separate selection of checksum_type for insync and validation
-
- Closed
-
- is duplicated by
-
PUP-3726 File does not establish sync state when using mtime checksum
-
- Closed
-
-
PUP-752 Support lighter weight checksums for files
-
- Closed
-
- relates to
-
PUP-4329 Filebucket fails to update file resource if checksum doesn't match the configured checksum type
-
- Closed
-
-
PUP-2423 Filebucket server should warn, not fail, if checksum type is not supported
-
- Closed
-
-
PUP-1072 support HTTP(S) URL as the file 'source'
-
- Closed
-
- clones
1.
|
Server should use agent specified checksum |
|
Closed | Unassigned |
2.
|
Fix puppet apply writing source to file when using non-md5 checksum type |
|
Closed | Unassigned |
3.
|
Fix puppet agent writing source to file when using non-md5 checksum type |
|
Closed | Unassigned |
4.
|
Fix writing content to file with non-md5 checksum type |
|
Closed | Unassigned |
5.
|
Fix puppet apply/agent when recursively copying a directory |
|
Closed | Unassigned |
6.
|
Fix mtime/ctime checksum type |
|
Closed | Unassigned |
7.
|
Write acceptance tests |
|
Closed | Unassigned |