Issue #9941 has been updated by Jeff McCune.
Tracing this down it appears that `puppet/network/format_handler.rb` is masking
the underlying network connectivity exception.
<pre>
5 module Puppet::Network::FormatHandler
6 class FormatError < Puppet::Error; end
7
8 class FormatProtector
9 attr_reader :format
10
11 def protect(method, args)
12 Puppet::Network::FormatHandler.format(format).send(method, *args)
13 rescue => details
14 direction = method.to_s.include?("intern") ? "from" : "to"
15 error = FormatError.new("Could not #{method} #{direction}
#{format}: #{details}")
16 error.set_backtrace(details.backtrace)
17 raise error
18 end
</pre>
I'll take care of this ticket.
----------------------------------------
Bug #9941: REST API indirection should be more specific when a host cannot be
reached
https://projects.puppetlabs.com/issues/9941
Author: Jeff McCune
Status: Accepted
Priority: Normal
Assignee: Jeff McCune
Category: usability
Target version: 2.7.x
Affected Puppet version: 2.7.0
Keywords: indirection, exception, error
Branch:
# Overview #
(For Jeff - Shave this Yak)
This exception seems wrong to me. It's not a FormatError but rather a network
reachability issue.
<pre>
Puppet::Network::FormatHandler::FormatError: Could not render to pson:
getaddrinfo: Name or service not known
from /opt/puppet/lib/ruby/1.8/net/http.rb:560:in `initialize'
from /opt/puppet/lib/ruby/1.8/net/http.rb:560:in `open'
from /opt/puppet/lib/ruby/1.8/net/http.rb:560:in `connect'
from /opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
from /opt/puppet/lib/ruby/1.8/timeout.rb:101:in `timeout'
from /opt/puppet/lib/ruby/1.8/net/http.rb:560:in `connect'
from /opt/puppet/lib/ruby/1.8/net/http.rb:553:in `do_start'
from /opt/puppet/lib/ruby/1.8/net/http.rb:542:in `start'
from /opt/puppet/lib/ruby/1.8/net/http.rb:1035:in `request'
from /opt/puppet/lib/ruby/1.8/net/http.rb:772:in `get'
from /opt/puppet/lib/site_ruby/1.8/puppet/indirector/rest.rb:94:in
`send'
from /opt/puppet/lib/site_ruby/1.8/puppet/indirector/rest.rb:94:in
`http_request'
from /opt/puppet/lib/site_ruby/1.8/puppet/indirector/rest.rb:76:in
`http_get'
from /opt/puppet/lib/site_ruby/1.8/puppet/indirector/rest.rb:118:in
`find'
from
/opt/puppet/lib/site_ruby/1.8/puppet/indirector/certificate/rest.rb:11:in `find'
from
/opt/puppet/lib/site_ruby/1.8/puppet/indirector/indirection.rb:189:in `find'
from /opt/puppet/lib/site_ruby/1.8/puppet/ssl/host.rb:243:in `to_pson'
from /opt/puppet/lib/site_ruby/1.8/puppet/network/format.rb:67:in `send'
from /opt/puppet/lib/site_ruby/1.8/puppet/network/format.rb:67:in
`render'
from
/opt/puppet/lib/site_ruby/1.8/puppet/network/format_handler.rb:12:in `send'
from
/opt/puppet/lib/site_ruby/1.8/puppet/network/format_handler.rb:12:in `protect'
from
/opt/puppet/lib/site_ruby/1.8/puppet/network/format_handler.rb:26:in `render'
from
/opt/puppet/lib/site_ruby/1.8/puppet/network/format_handler.rb:166:in `render'
from /opt/puppet/lib/site_ruby/1.8/puppet/indirector/rest.rb:152:in
`save'
from
/opt/puppet/lib/site_ruby/1.8/puppet/indirector/indirection.rb:265:in `save'
from
/vagrant/src_pe_only/envpuppet/cloud-provisioner/lib/puppet/cloudpack.rb:677:in
`attempt_to_sign_certificate'
</pre>
--
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.