Feature #3170

Please re-introduce checksum => nosum for file resources

Added by Tim Stoop about 2 years ago. Updated 21 days ago.

Status:Closed Start date:02/09/2010
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:file
Target version:-
Affected Puppet version:0.25.4 Branch:
Keywords:
Votes: 1

Description

According to #558, there used to be a ‘nosum’ option for the file resource. We have a lot of resource defined like this:

{{{ file { “/tmp”: mode => 1777, } }}}

Currently, for each of these resources it calculates the checksum every puppet run. It would be convenient for us if it only checks the directory mode or other specifically set options, but not the checksum. Saves a lot of time and output we don’t need. I think more people would find this convenient.

Also, currently the documentation seems to hint that it’s possible to disable checksumming (it uses the phrase “The default checksum parameter, if checksums are enabled, is md5.”).


Related issues

related to Puppet - Bug #2929: File rucurse true, checksums all the files with md5 Closed 12/14/2009
related to Puppet - Bug #2899: puppetd checks client files recursively even if they aren... Rejected 12/08/2009

History

Updated by Tim Stoop about 2 years ago

That’s supposed to be:

file { "/tmp":
  mode => 1777,
}

Updated by Peter Meier about 2 years ago

imho dup or at least related to: #2899

Updated by John Bollinger about 2 years ago

According to the description of this issue on puppet-users,

Every puppetd run gives me something like:

notice: //kbp_debian/File[/tmp]/checksum: checksum changed ‘{mtime}Mon Feb 08 22:50:00 +0100 2010’ to ‘{mtime}Tue Feb 09 21:11:06 +0100 2010’

I think that’s saying Puppet is using its mtime method for “checksumming”. That’s fine in itself, but I don’t think Puppet actually handles mtime checksums correctly. If I explicitly set a file’s checksum to ‘mtime’, I get the same behavior: the file is updated on every run, even though its content is unchanged (CentOS 5, Puppet 0.24.8). At each iteration, the mtimes it compares appear to be the times of the previous and current Puppet runs.

Updated by James Turnbull almost 2 years ago

  • Category set to file
  • Status changed from Unreviewed to Accepted
  • Assignee set to Jesse Wolfe

Updated by Kevin Cai almost 2 years ago

file { “/tmp”: mode => 1777, checksum => undef, }

it should work according to the comment #9 in http://projects.reductivelabs.com/issues/1973

Updated by Joshua Lifton about 1 month ago

  • Assignee deleted (Jesse Wolfe)

This issue was assigned to a former Puppet Labs employee. Adding back to the pool of unreviewed issues.

Updated by Ben Hughes 21 days ago

  • Description updated (diff)
  • Status changed from Accepted to Unreviewed

Updated by Michael Stahnke 21 days ago

  • Description updated (diff)
  • Status changed from Unreviewed to Closed

I am unable to reproduce this behavior in 2.7.9 on Centos5.

[root@centos tests]# ls -al / | grep tmp
drwxrwxrwt   4 root root  4096 Jan 21 09:36 tmp
[root@centos tests]# cat foo.pp 
file { "/tmp": mode => 1777, checksum => mtime, }
[root@centos tests]# puppet apply --debug --verbose foo.pp  | grep tmp
dnsdomainname: Unknown host
debug: /File[/tmp]/seluser: Found seluser default 'system_u' for /tmp
debug: /File[/tmp]/selrole: Found selrole default 'object_r' for /tmp
debug: /File[/tmp]/seltype: Found seltype default 'tmp_t' for /tmp
[root@centos tests]# ls -al / | grep tmp
drwxrwxrwt   4 root root  4096 Jan 21 09:36 tmp
[root@centos tests]# vim foo.pp 
[root@centos tests]# cat foo.pp 
file { "/tmp": mode => 1777, checksum => undef, }
[root@centos tests]# puppet apply --debug --verbose foo.pp  | grep tmp
dnsdomainname: Unknown host
debug: /File[/tmp]/seluser: Found seluser default 'system_u' for /tmp
debug: /File[/tmp]/selrole: Found selrole default 'object_r' for /tmp
debug: /File[/tmp]/seltype: Found seltype default 'tmp_t' for /tmp
[root@centos tests]# ls -al / | grep tmp
drwxrwxrwt   4 root root  4096 Jan 21 09:36 tmp
[root@centos tests]# 

Also available in: Atom PDF