When a file resource with ensure => absent is also set to backup to a filebucket, it gets bucketed before being removed but the hash is not recorded in the log. For example, if this code is on the master:
filebucket { 'main':
|
server => $settings::certname,
|
path => false,
|
}
|
file { '/root/removeme':
|
ensure => absent,
|
backup => 'main',
|
}
|
This is what the log shows normally:
[root@puppet-eli ~]# touch removeme
|
[root@puppet-eli ~]# puppet agent --no-daemonize --onetime --logdest console
|
Notice: /Stage[main]/Profile::Base/File[/root/removeme]/ensure: removed
|
Notice: Finished catalog run in 2.70 seconds
|
By contrast, here's what the verbose log shows:
[root@puppet-eli ~]# touch removeme
|
[root@puppet-eli ~]# puppet agent --no-daemonize --onetime --logdest console --verbose
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for puppet-eli.localdomain
|
Info: Applying configuration version '1426540724'
|
Info: Computing checksum on file /root/removeme
|
Info: /Stage[main]/Profile::Base/File[/root/removeme]: Filebucketed /root/removeme to main with sum d41d8cd98f00b204e9800998ecf8427e
|
Notice: /Stage[main]/Profile::Base/File[/root/removeme]/ensure: removed
|
Notice: Finished catalog run in 3.03 seconds
|
Having the hash available would be useful. The line:
Notice: /Stage[main]/Profile::Base/File[/root/removeme]/ensure: removed
|
should instead say something like:
Notice: /Stage[main]/Profile::Base/File[/root/removeme]/ensure: removed file with content '{md5}d41d8cd98f00b204e9800998ecf8427e'
|
QA Risk Analysis
Probability |
Low (not a common use case?) |
Impact |
Low (a logged hash is a debugging aid, not critical data) |
Risk Level |
Low |
Test Level |
spec |