The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #6004

checksum => mtime still reads the source and target files

Added by Daniel Piddock almost 4 years ago. Updated almost 3 years ago.

Status:DuplicateStart date:01/25/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:file
Target version:-
Affected Puppet version:2.6.4 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

Copying a file with checksum set to mtime still causes both the target and source file to be read (and md5summed?)

file { '/tmp/foobar2':
    source   => '/tmp/foobar1',
    checksum => mtime,
}

strace of puppet shows that the source and target files are still being read even when the timestamps of the files haven’t changed.

If the target is missing:

  • open,read,close source
  • test for target, not present
  • open target.temp
  • open,read,close source
  • write,close target.temp
  • open,read,close target.temp
  • rename target.tempt to target
  • open,read,close source

If the target was present:

  • open,read,close source
  • open,read,close target

Attached straces. Source is /tmp/foobar1, target is /tmp/foobar2, content is “foobar1content”

mtime-notarget.log - strace checksum => mtime, target does not exist (1.3 MB) Daniel Piddock, 01/25/2011 12:16 pm

mtime-target.log - strace checksum => mtime, target exists (1.29 MB) Daniel Piddock, 01/25/2011 12:16 pm


Related issues

Duplicates Puppet - Bug #13199: md5lite, mtime not honoured for file type/provider Accepted 03/16/2012

History

#1 Updated by Markus Roberts over 3 years ago

  • Status changed from Unreviewed to Duplicate

Thanks for the additional information on this (grumble) ongoing issue.

#2 Updated by Jo Rhett almost 3 years ago

Markus Roberts wrote:

Thanks for the additional information on this (grumble) ongoing issue.

Can you please reference the bug this duplicates, so we know where the patch will be?

#3 Updated by Anonymous almost 3 years ago

Jo Rhett wrote:

Markus Roberts wrote:

Thanks for the additional information on this (grumble) ongoing issue.

Can you please reference the bug this duplicates, so we know where the patch will be?

Unfortunately, no. I have no idea what Markus was thinking of way back when, and unless he steps up – since he no longer works with us – I don’t think we have any way to recover that detail.

Also available in: Atom PDF