Bug #5351
Puppet checksums file resources when no source specified
| Status: | Accepted | Start date: | 11/18/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | file | |||
| Target version: | - | |||
| Affected Puppet version: | 0.25.5 | Branch: | ||
| Keywords: | file, checksum | |||
Description
When using a manifest like the following:
file { $dirs: ensure => directory, recurse => true, owner => root, group => root, mode => 755; }
puppet checksums every file in the directory, even though there is no source specified to compare the resulting checksums to. This seems like bad behavior, as when trying to only set permission on a large directory structure, this can take a very long time doing nothing useful.
Related issues
History
#1
Updated by Brice Figureau over 2 years ago
You didn’t specify in which version you’ve seen this behavior. By default checksum is set to md5, use checksum => none to make sure files won’t be checksummed.
#2
Updated by Zach Leslie over 2 years ago
- Affected Puppet version set to 0.25.5
#3
Updated by Nigel Kersten over 2 years ago
- Status changed from Unreviewed to Needs More Information
#4
Updated by Zach Leslie over 2 years ago
I am trying to reproduce the following in puppet:
find /blag -type f -exec chmod 644 {} \;
find /blag -type d -exec chmod 755 {} \;
chown -R root:root /blag
with the following puppet code:
file { "/blag": ensure => directory, recurse => true, owner => root, group => root, mode => 644; }
I now know that the checksum => none will solve the issue of puppet taking forever, so for now my issue is solved, so thank you. So the question becomes, does it make sense to checksum anything if there is no source specified? Would it be possible to make the default value for checksum ‘none’ if there is no source. The default currently of md5 makes sense when a source is available to compare with, but not when the source is absent.
#5
Updated by Nan Liu over 1 year ago
- Category set to file
- Status changed from Needs More Information to Accepted
- Keywords set to file, checksum