Issue #4319 has been updated by Brice Figureau.
You can also try the following completely untested (that certainly doesn't
work) path (to be applied on the client):
<pre>
diff --git a/lib/puppet/type/file/content.rb b/lib/puppet/type/file/content.rb
index 74b380f..0d0bb55 100755
--- a/lib/puppet/type/file/content.rb
+++ b/lib/puppet/type/file/content.rb
@@ -184,7 +184,7 @@ module Puppet
end
def chunk_file_from_source(source_or_content)
- request = Puppet::Indirector::Request.new(:file_content, :find,
source_or_content.full_path)
+ request = Puppet::Indirector::Request.new(:file_content, :find,
source_or_content.full_path.sub(/^\//,''))
connection =
Puppet::Network::HttpPool.http_instance(source_or_content.server,
source_or_content.port)
connection.request_get(indirection2uri(request),
add_accept_encoding({"Accept" => "raw"})) do |response|
case response.code
</pre>
----------------------------------------
Bug #4319: File serving broken via mongrel in Puppet 2.6
http://projects.puppetlabs.com/issues/4319
Author: Jasper Poppe
Status: Unreviewed
Priority: High
Assigned to:
Category:
Target version:
Affected version: 2.6.0
Keywords:
Branch:
I have been busy for almost the whole day with this one, I hope I will give
enough detail. If more needed ping me.
File serving goes wrong in Puppet 2.6 via Mongrel, I suspect the issue is
caused by two slashes in the request URL. Here is a snippet of our Nginx log
file. In the middle line there are 2 slashes (in the file_content//modules
part).
- [21/Jul/2010:16:17:51 +0200] "GET
/production/file_metadata/modules/java/var/cache/debconf/sun-java5-jdk.seed
HTTP/1.1" 200 330 "-" "-"
- [21/Jul/2010:16:17:52 +0200] "GET
/production/file_content//modules/java/var/cache/debconf/sun-java5-jdk.seed
HTTP/1.1" 404 78 "-" "-"
- [21/Jul/2010:16:17:52 +0200] "GET
/production/file_metadata/modules/java/var/cache/debconf/sun-java5-jdk.seed
HTTP/1.1" 200 330 "-" "
We use exact the same Nginx configuration as we did for 2.5. I have tried many
different options but I don't expect the problem is there.
The interesting part is:
When you run the puppetmaster with the following parameters (so via webrick)
everything works fine.
/usr/sbin/puppetmasterd --no-daemonize --debug
When you run Puppet with Mongrel as backend the master says that it can not
find the contents of the file:
/usr/sbin/puppetmasterd --ssl_client_header=HTTP_X_SSL_SUBJECT
--servertype=mongrel --masterport=18140 --no-daemonize --debug
Snippet of master log:
debug: importing '/etc/puppet/manifests/stages.pp' in environment production
debug: Executing '/etc/puppet/scripts/get-config-version'
debug: No true answers and no default
debug: importing '/etc/puppet/modules/configs/cs-ops/manifests/init.pp' in
environment production
info: Automatically imported cs-ops from cs-ops into production
debug: File[/var/cache/debconf/sun-java5-jdk.seed]: Adding default for group
debug: File[/var/cache/debconf/sun-java5-jdk.seed]: Adding default for owner
debug: File[/var/cache/debconf/sun-java5-jdk.seed]: Adding default for mode
notice: Compiled catalog for cs-ops001b.foo.com in environment production
in 0.43 seconds
info: Caching catalog for cs-ops001b.foo.com
debug: Searched for resources in 0.01 seconds
debug: Searched for resource params and tags in 0.00 seconds
debug: Resource removal in 0.00 seconds
debug: Resource merger in 0.02 seconds
debug: Resource addition in 0.00 seconds
debug: Performed resource comparison in 0.02 seconds
debug: Using cached node for cs-ops001b.intern.marktplaats.nl
debug: Saved catalog to database in 0.04 seconds
info: Could not find file_content for
'/modules/java/var/cache/debconf/sun-java5-jdk.seed'
So the master says: info: Could not find file_content for
'/modules/java/var/cache/debconf/sun-java5-jdk.seed'
While the clients 'set' the content of the file with nothing :(
info: Retrieving plugin
info: /File[/var/lib/puppet/lib]: Storing newly-audited value for content
info: Loading facts in conterm
info: Loading facts in conterm
info: Caching catalog for cs-ops001.foo.com
info: Applying configuration version 'ref="refs/heads/master"
commit=212f99a4bce8f2b9edc5254d05d16573a2a84057'
notice:
/Stage[main]/Cs-ops/File[/var/cache/debconf/sun-java5-jdk.seed]/ensure: defined
content as '{md5}ff45e1ccbb1a98a180f242d6cb68215e'
notice: Finished catalog run in 0.08 seconds
It happens on any file I throw against it but here is my test snippet.
class cs-ops {
File {
owner => 'root',
group => 'root',
mode => '0644'
}
file { '/var/cache/debconf/sun-java5-jdk.seed':
source => 'puppet:///modules/java/var/cache/debconf/sun-java5-jdk.seed',
ensure => present;
}
}
--
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.