Level Resource message
err Puppet Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node xxx: 001。,Could not load external node results for xxx: undefined method `inject' for false:FalseClass ::--- false
notice Puppet Using cached catalog
err Puppet Could not retrieve catalog; skipping run
def translate(name, output)
YAML.load(output).inject({}) do |hash, data|
case data[0]
when String
hash[data[0].intern] = data[1]
when Symbol
hash[data[0]] = data[1]
else
raise Puppet::Error, "key is a #{data[0].class}, not a string or symbol"
end
hash
end
rescue => detail
raise Puppet::Error, "001,Could not load external node results for #{name}: #{detail} ::#{output} "
end
# query External node
begin
result = ""
timeout(tsecs) do
result = enc(certname)
cache(certname, result)
end
rescue TimeoutError, SocketError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED
# Read from cache, we got some sort of an error.
result = read_cache(certname)