Issue #1564 has been updated by pnasrat.
Status changed from Accepted to Needs design decision
This is going to require a change to the xmlrpc protocol, whilst
Puppet::FileServing::Metadata in theory supports multiple checksum_type (it
doesn't work correctly at the moment but I've fixed that in my branch for this
ticket).
When we are describe the source file in type/file/source.rb we call the server:
<pre>
desc = server.describe(path, @resource[:links])
</pre>
Which is served by the interface in fileserver.rb:
<pre>
iface.add_method("string describe(string, string)")
</pre>
This in turn calls FileServing::Metadata to get the information. However we
need to communicate the desired checksum type, and ensure that is used
throughout (including when we update the checksum in our final write()).
----------------------------------------
Bug #1564: Saving File#checksum to state.yaml broken
http://projects.reductivelabs.com/issues/show/1564
Author: DavidS
Status: Needs design decision
Priority: Normal
Assigned to: pnasrat
Category: file
Target version: 0.24.6
Complexity: Unknown
Affected version: 0.24.5
Keywords:
When recursively copying a directory with checksum=>mtime, puppetd doesn't
notice that it already has the correct local version and triggers updates on
every run.
Puppet manifest:
<pre>
file {
"/var/lib/puppet/modules/${name}":
source => [ "puppet:///${name}/modules_dir", "puppet:///common/empty"],
checksum => mtime,
# ignore the placeholder
ignore => '\.ignore',
recurse => true, purge => true, force => true,
mode => $mode, owner => $owner, group => $group;
}
</pre>
state.yaml:
<pre>
---
File[/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list]:
:checked: 2008-09-07 14:10:04.590123 +00:00
:checksums:
:mtime: "{md5}13f98c2ba6787ca5e7dbf74e99ff677c"
:synced: 2008-09-07 14:10:04.806034 +00:00
</pre>
puppetd --test --debug
<pre>
debug: Calling fileserver.list
debug: Calling fileserver.describe
debug: Calling fileserver.retrieve
debug:
//Modules_dir[virtual]/File[/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list]/source:
Executing 'diff
/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list
/tmp/puppet-diffing.10425.0'
debug:
//Modules_dir[virtual]/File[/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list]:
Changing checksum,source
debug:
//Modules_dir[virtual]/File[/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list]:
2 change(s)
debug:
//Modules_dir[virtual]/File[/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list]/checksum:
Replacing
/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list
checksum {md5}13f98c2ba6787ca5e7dbf74e99ff677c with {mtime}Sun Sep 07 14:04:45
+0000 2008
notice:
//Modules_dir[virtual]/File[/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list]/checksum:
checksum changed '{md5}13f98c2ba6787ca5e7dbf74e99ff677c' to '{mtime}Sun Sep 07
14:04:45 +0000 2008'
debug: Calling puppetbucket.addfile
info:
//Modules_dir[virtual]/File[/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list]:
Filebucketed to server with sum 13f98c2ba6787ca5e7dbf74e99ff677c
debug:
//Modules_dir[virtual]/File[/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list]/checksum:
Replacing
/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list
checksum {mtime}Sun Sep 07 14:04:45 +0000 2008 with
{md5}13f98c2ba6787ca5e7dbf74e99ff677c
notice:
//Modules_dir[virtual]/File[/var/lib/puppet/modules/virtual/build_vserver/skel_etch/apt/sources.list]/source:
replacing from source
puppet:///virtual/modules_dir/build_vserver/skel_etch/apt/sources.list with
contents {md5}13f98c2ba6787ca5e7dbf74e99ff677c
</pre>
----------------------------------------
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://reductivelabs.com/redmine/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
-~----------~----~----~----~------~----~------~--~---