Issue #7295 has been updated by Zach Leslie.
Using the manifest Jeff posted and removing the state.yaml file to ensure fresh
information:
<pre>
$ sudo envpuppet puppet -v /tmp/test.pp
info: Loading facts in certname
info: Loading facts in certname
info: Applying configuration version '1306446101'
info: FileBucket adding {md5}d603ac0c04b9d08974482ae7fd4cf55d
info: /Stage[main]//File[/tmp/test]: Filebucketed /tmp/test to puppet with sum
d603ac0c04b9d08974482ae7fd4cf55d
notice: /Stage[main]//File[/tmp/test]/content: content changed
'{md5}d603ac0c04b9d08974482ae7fd4cf55d' to
'{md5}128ecf542a35ac5270a87dc740918404'
notice: /Stage[main]//File[/tmp/test]/owner: audit change: newly-recorded value 0
notice: /Stage[main]//File[/tmp/test]/group: audit change: newly-recorded value 0
notice: /Stage[main]//File[/tmp/test]/mode: audit change: newly-recorded value
644
notice: /Stage[main]//File[/tmp/test]/content: audit change: newly-recorded
value {md5}d603ac0c04b9d08974482ae7fd4cf55d
</pre>
I do see the md5 written:
<pre>
$ sudo grep d603ac0c04b9d08974482ae7fd4cf55d /var/lib/puppet/state/state.yaml
!ruby/sym content: "{md5}d603ac0c04b9d08974482ae7fd4cf55d
</pre>
Then if I change the manifest slightly with content => "bla2" and rerun the
manifest:
<pre>
$ sudo envpuppet puppet -v /tmp/test.pp
info: Loading facts in certname
info: Loading facts in certname
info: Applying configuration version '1306446230'
info: FileBucket got a duplicate file {md5}128ecf542a35ac5270a87dc740918404
info: /Stage[main]//File[/tmp/test]: Filebucketed /tmp/test to puppet with sum
128ecf542a35ac5270a87dc740918404
notice: /Stage[main]//File[/tmp/test]/content: content changed
'{md5}128ecf542a35ac5270a87dc740918404' to
'{md5}a1288b1c7e2257a90bad9bdfb7690fbb' (previously recorded value was
{md5}d603ac0c04b9d08974482ae7fd4cf55d)
notice: Finished catalog run in 0.05 seconds
</pre>
The command:
<pre>
sudo grep a1288b1c7e2257a90bad9bdfb7690fbb /var/lib/puppet/state/state.yaml
</pre>
yields nothing. So it looks like its being written initially, but not being
updated.
Also note, that as of 2.6.7 the md5 reported in the run does apear to be the
md5 of the file.
<pre>
$ md5sum /tmp/test
a1288b1c7e2257a90bad9bdfb7690fbb /tmp/test
</pre>
----------------------------------------
Bug #7295: File chsecksum is not being written to state.yaml
https://projects.puppetlabs.com/issues/7295
Author: Zach Leslie
Status: Needs More Information
Priority: High
Assignee: Zach Leslie
Category:
Target version:
Affected Puppet version: 2.6.4
Keywords:
Branch:
When the following manifest is run, I expect that the md5sum gets written to
state.yaml.
<pre>
file {
"/tmp/test":
content => "bla",
audit => all,
checksum => md5,
}
</pre>
But no such content is written to state.yaml.
<pre>
$ sudo puppet -v /tmp/test.pp; sudo grep -A11 "/tmp/test"
/var/lib/puppet/state/state.yaml
notice: /Stage[main]//File[/tmp/test]/content: content changed
'{md5}128ecf542a35ac5270a87dc740918404' to
'{md5}bc164a80b614c873a25ea8ea38471ced'
"File[/tmp/test]":
!ruby/sym owner: 0
!ruby/sym mode: 420
!ruby/sym seluser:
!ruby/sym group: 0
!ruby/sym selrole:
!ruby/sym target: !ruby/sym notlink
!ruby/sym seltype:
!ruby/sym selrange:
!ruby/sym checked: 2011-04-29 18:11:26.128960 -07:00
!ruby/sym synced: 2011-04-29 17:29:56.315849 -07:00
</pre>
The only thing missing from what I can tell is the md5sum.
Also, the mode here is 420, which looking at the file, is incorrect:
<pre>
$ ls -ld /tmp/test
-rw-r--r-- 1 root wheel 4 Apr 29 18:14 /tmp/test
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.