[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.1rc1-141-gcdb2b90

Markus Roberts Markus at reality.com
Mon Aug 16 12:48:58 UTC 2010


The following commit has been merged in the upstream branch:
commit 3a6ca54a6e8ad353f207bc85433d1204b5ca48bc
Author: Brice Figureau <brice-puppet at daysofwonder.com>
Date:   Wed Aug 4 22:34:33 2010 +0200

    Fix #4458 - Do not dump the whole environment when instances can't be found
    
    When generating the error message when we can't find any instances for a
    search request, we were "inspect"ing the request which now contains
    an environment instance which itself contains a lots of things (including
    all the known resource types).
    Thus it was generating a very large "reason" (ie the HTTP error string).
    On some environments (ie proxied mongrel) this was too large and the
    proxy would produce an error 500.
    
    I just changed the error message to just log the indirection name and
    request key (which should be enough to understand what is wrong).
    
    Signed-off-by: Brice Figureau <brice-puppet at daysofwonder.com>

diff --git a/lib/puppet/network/http/handler.rb b/lib/puppet/network/http/handler.rb
index 03d24b3..61ae2d2 100644
--- a/lib/puppet/network/http/handler.rb
+++ b/lib/puppet/network/http/handler.rb
@@ -117,7 +117,7 @@ module Puppet::Network::HTTP::Handler
     result = indirection_request.model.search(indirection_request.key, indirection_request.to_hash)
 
     if result.nil? or (result.is_a?(Array) and result.empty?)
-      return do_exception(response, "Could not find instances in #{indirection_request.indirection_name} with '#{indirection_request.to_hash.inspect}'", 404)
+      return do_exception(response, "Could not find instances in #{indirection_request.indirection_name} with '#{indirection_request.key}'", 404)
     end
 
     format = format_to_use(request)

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list