summaryrefslogtreecommitdiff
path: root/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
commit686113531d23f30e9973d659c456ae33eb9cff1f (patch)
treef225de7251a8b49b8d183dd168bab0a0addbe23f /lib/chef/formatters/error_inspectors/registration_error_inspector.rb
parentd1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff)
downloadchef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
Diffstat (limited to 'lib/chef/formatters/error_inspectors/registration_error_inspector.rb')
-rw-r--r--lib/chef/formatters/error_inspectors/registration_error_inspector.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
index 8c070742f7..c7c1454311 100644
--- a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
@@ -26,25 +26,25 @@ class Chef
when Net::HTTPServerException, Net::HTTPFatalError
humanize_http_exception(error_description)
when Errno::ECONNREFUSED, Timeout::Error, Errno::ETIMEDOUT, SocketError
- error_description.section("Network Error:",<<-E)
+ error_description.section("Network Error:", <<-E)
There was a network error connecting to the Chef Server:
#{exception.message}
E
- error_description.section("Relevant Config Settings:",<<-E)
+ error_description.section("Relevant Config Settings:", <<-E)
chef_server_url "#{server_url}"
If your chef_server_url is correct, your network could be down.
E
when Chef::Exceptions::PrivateKeyMissing
- error_description.section("Private Key Not Found:",<<-E)
+ error_description.section("Private Key Not Found:", <<-E)
Your private key could not be loaded. If the key file exists, ensure that it is
readable by chef-client.
E
- error_description.section("Relevant Config Settings:",<<-E)
+ error_description.section("Relevant Config Settings:", <<-E)
validation_key "#{api_key}"
E
when Chef::Exceptions::InvalidRedirect
- error_description.section("Invalid Redirect:",<<-E)
+ error_description.section("Invalid Redirect:", <<-E)
Change your server location in client.rb to the server's FQDN to avoid unwanted redirections.
E
when EOFError
@@ -59,18 +59,18 @@ E
case response
when Net::HTTPUnauthorized
if clock_skew?
- error_description.section("Authentication Error:",<<-E)
+ error_description.section("Authentication Error:", <<-E)
Failed to authenticate to the chef server (http 401).
The request failed because your clock has drifted by more than 15 minutes.
Syncing your clock to an NTP Time source should resolve the issue.
E
else
- error_description.section("Authentication Error:",<<-E)
+ error_description.section("Authentication Error:", <<-E)
Failed to authenticate to the chef server (http 401).
E
error_description.section("Server Response:", format_rest_error)
- error_description.section("Relevant Config Settings:",<<-E)
+ error_description.section("Relevant Config Settings:", <<-E)
chef_server_url "#{server_url}"
validation_client_name "#{username}"
validation_key "#{api_key}"
@@ -79,34 +79,34 @@ If these settings are correct, your validation_key may be invalid.
E
end
when Net::HTTPForbidden
- error_description.section("Authorization Error:",<<-E)
+ error_description.section("Authorization Error:", <<-E)
Your validation client is not authorized to create the client for this node (HTTP 403).
E
- error_description.section("Possible Causes:",<<-E)
+ error_description.section("Possible Causes:", <<-E)
* There may already be a client named "#{config[:node_name]}"
* Your validation client (#{username}) may have misconfigured authorization permissions.
E
when Net::HTTPBadRequest
- error_description.section("Invalid Request Data:",<<-E)
+ error_description.section("Invalid Request Data:", <<-E)
The data in your request was invalid (HTTP 400).
E
- error_description.section("Server Response:",format_rest_error)
+ error_description.section("Server Response:", format_rest_error)
when Net::HTTPNotFound
- error_description.section("Resource Not Found:",<<-E)
+ error_description.section("Resource Not Found:", <<-E)
The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
E
- error_description.section("Relevant Config Settings:",<<-E)
+ error_description.section("Relevant Config Settings:", <<-E)
chef_server_url "#{server_url}"
E
when Net::HTTPNotAcceptable
describe_406_error(error_description, response)
when Net::HTTPInternalServerError
- error_description.section("Unknown Server Error:",<<-E)
+ error_description.section("Unknown Server Error:", <<-E)
The server had a fatal error attempting to load the node data.
E
error_description.section("Server Response:", format_rest_error)
when Net::HTTPBadGateway, Net::HTTPServiceUnavailable
- error_description.section("Server Unavailable","The Chef Server is temporarily unavailable")
+ error_description.section("Server Unavailable", "The Chef Server is temporarily unavailable")
error_description.section("Server Response:", format_rest_error)
else
error_description.section("Unexpected API Request Failure:", format_rest_error)