Issue #4587 has been reported by Erwan Hesry.

----------------------------------------
Bug #4587: File download with Puppet 2.6
http://projects.puppetlabs.com/issues/4587

Author: Erwan Hesry
Status: Unreviewed
Priority: High
Assigned to: 
Category: 
Target version: 
Affected version: 
Keywords: Puppet 2.6 error file download empty 
Branch: 


Hi,

Something is wrong with Puppet 2.6 and file downloading. The server and the 
client are using 2.6 release. 

However, when I include a class in which a file needs to be downloaded, I got 
an empty file on the client (it can create some problems if we don't see this 
problem after reboot because Puppet erase the original file). For all files, 
that's the same md5sum that appears in the Puppet log :  
`{md5}d41d8cd98f00b204e9800998ecf8427e`. 

Finally, I've found the solution to this issue : I modified the file 
`/usr/lib/ruby/1.8/puppet/type/file/content.rb` at the line 187

Here is the change :

`original line : request = Puppet::Indirector::Request.new(:file_content, 
:find, source_or_content.full_path)`

`modified line : request = Puppet::Indirector::Request.new(:file_content, 
:find, source_or_content.full_path.sub(/^\//,''))`

After this modification, there isn't any problems when downloading files.
I think this error can be due to an error in the syntax when Puppet tries to 
download the file (a double / appears instead of on / like a normal URL), here 
is the nginx log :

`GET /debian/file_content//files/sshd/sshd_config`



-- 
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.

Reply via email to