Puppet: System Administration Automated

Support

Ticket #264 (new defect)

Opened 2 years ago

Last modified 7 months ago

file checksum option always uses md5-sums

Reported by: fux@users.berlios.de Assigned to: luke
Priority: normal Milestone:
Component: fileserving Version: 0.18.4
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Attached Patches: None Complexity: Medium

Description

From the Mailinglist: Subject: Re: [Puppet-users] strange mtime/md5sum behaviour and constantly

changing files with links

> as I have some huge files to distribute and md5-sum-checking takes SOME time
> for them, I'm trying to switch to mtime/timestamps, but got no luck. Regularly
> the mtime seems to change and additionally the md5sums generate themselves
> anyway.

I'm pretty sure that the file copying subsystem always uses checksums
regardless of what you ask.  This is a bug.  I thought I'd developed
it to support any of them, but realized recently I had not.

Message-Id: <5136CF0F-446C-44FB-9CC6-1A2776F60374@madstop.com>

thx for fixing,

Greetings,

/fux

Change History

10/12/06 02:57:44 changed by puppet

Checksumming with md5-files doesn't seem the only problem here, the checksum-type "mtime" seems to have a "bug":

On every sync, the mtime of the target file gets changed, if puppet compares the source-file (mtime some years ago) with the target-file (some 5 minutes ago), it has to resync that file. mtime only seems to make sense, if the corresponding time gets set by puppet after the sync, otherwise we shouldn't support mtime as checksum-type, I guess.

Another problem derived from this bugreport is the one luke mentioned as "pretty shure it is a bug". In source:/trunk/lib/puppet/type/pfile/checksum.rb@1760#L240 the _corresponding_ checksum-type should be used, I guess, not a default. But for now I'm to tired to create a patch, or debug any futher, sorry :)

here is my "testcase", with which I debugged the problem:

$ cat site.pp
file { "/home/thorsten/copy": 
        source => "/home/thorsten/huge",
        checksum => "mtime"
}

04/05/07 21:49:21 changed by luke

  • specification set to Unnecessary.
  • patch set to None.
  • complexity set to Medium.
  • approval set to Unnecessary.
  • compatibility set to Full.
  • stage set to Accepted.

04/24/08 06:47:18 changed by luke

  • component changed from file to fileserving.