Bug #4587
File download with Puppet 2.6
| Status: | Duplicate | Start date: | 08/23/2010 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | fileserving | |||
| Target version: | 2.6.1 | |||
| Affected Puppet version: | 2.6.0 | Branch: | ||
| Keywords: | Puppet 2.6 error file download empty | |||
| Votes: | 0 |
Description
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
Related issues
History
Updated by James Turnbull over 1 year ago
- Category set to fileserving
- Status changed from Unreviewed to Duplicate
- Target version set to 2.6.1
- Affected Puppet version set to 2.6.0
Duplicate of #4319.