Issue #6541 has been updated by James Turnbull. Status changed from Available In Testing Branch to Closed
Pushed in commit:7c2a980212055dc41f0ab163857b8a91316d8185 in branch 2.6.x ---------------------------------------- Bug #6541: File type truncates target when filebucket can not retrieve hash https://projects.puppetlabs.com/issues/6541 Author: donavan m Status: Closed Priority: Immediate Assignee: Category: Target version: 2.6.6 Affected Puppet version: 2.6.5 Keywords: Branch: https://github.com/mmrobins/puppet/tree/ticket/2.6.next/6541-md5_in_content_truncates This looks to be introduced in fd73874, fixing #6107, and is regression from 2.6.4. If the File type has a content param with a checksum the filebucket should be used to retrieve the content (#3822). If the filebucket can't retrieve the content the target file is truncated and reported as replaced with correct checksum. Using this sample manifest <pre> file { "/tmp/bar": content => '{md5}invalidhash' } </pre> Running a simple master with that manifest <pre> puppet master --debug --no-daemonize --masterport 8100 --trace --manifest /tmp/test.pp </pre> Expected behavior from 2.6.4 (commit f135a64 actually) <pre> [localhost puppet]$ git checkout fd73874^ HEAD is now at f135a64... Merge branch 'bug/2.6.next/5755' into 2.6.next [root@localhost puppet]# puppet agent -t --masterport 8100 info: Retrieving plugin info: Caching catalog for localhost info: Applying configuration version 'puppetmaster.domain;' err: /Stage[main]//File[/tmp/bar]: Could not evaluate: Could not retrieve content for {md5}invalidhash from filebucket: Invalid checksum "invalidhash" at /tmp/test.pp:1 notice: Finished catalog run in 0.17 seconds </pre> And the behavior introduced in 2.6.5rc1 (commit `fd73874`) <pre> [localhost puppet]$ git checkout fd73874 Previous HEAD position was f135a64... Merge branch 'bug/2.6.next/5755' into 2.6.next HEAD is now at fd73874... (#6107) Fix an error when auditing a file with empty content [localhost puppet]# puppet agent -t --masterport 8100 info: Retrieving plugin info: Caching catalog for localhost info: Applying configuration version 'puppetmaster.domain;' info: FileBucket got a duplicate file {md5}d41d8cd98f00b204e9800998ecf8427e info: /Stage[main]//File[/tmp/bar]: Filebucketed /tmp/bar to puppet with sum d41d8cd98f00b204e9800998ecf8427e notice: /Stage[main]//File[/tmp/bar]/content: content changed '{md5}d41d8cd98f00b204e9800998ecf8427e' to '{md5}invalidhash' notice: Finished catalog run in 0.24 seconds [root@localhost puppet]# wc /tmp/bar 0 0 0 /tmp/bar </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.
