summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@bytemark.co.uk>2017-07-13 08:10:40 +0100
committerSteve Kemp <steve@bytemark.co.uk>2017-07-13 08:10:40 +0100
commit21870b8cf59f0450ef09c10890f64bb5b88c7645 (patch)
treea8a15f6d9279f15fb806ce90543e587fa1d41df3
parent3480fe810e83449516388176359429006ae1d8a0 (diff)
parent967511ac64f72e50f5d8355a2fcc24ad3ed93aab (diff)
Merge branch 'only-alert-on-both-dns-errors' into 'master'
Alert in more detail on DNS failures. See merge request !10
-rw-r--r--debian/changelog6
-rw-r--r--lib/custodian/protocoltest/http.rb4
2 files changed, 8 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 581c1e7..157a4c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+custodian (0.35) stable; urgency=low
+
+ * Alert in more detail on DNS failures.
+
+ -- Steve Kemp <steve@bytemark.co.uk> Thu, 26 Jun 2017 12:00:21 +0100
+
custodian (0.34) stable; urgency=low
* Install a cron.daily task to reap old tests - which will ensure that
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb
index 67b4660..a3f34cc 100644
--- a/lib/custodian/protocoltest/http.rb
+++ b/lib/custodian/protocoltest/http.rb
@@ -338,7 +338,7 @@ module Custodian
errors << "#{protocol_msg}: More than 10 redirections."
rescue Curl::Err::HostResolutionError => x
# Log the DNS error-message.
- resolution_errors << "#{resolve_mode} - #{x.message}"
+ resolution_errors << "#{protocol_msg}: #{x.class}: #{x.message}\n #{x.backtrace.join("\n ")}."
rescue => x
errors << "#{protocol_msg}: #{x.class}: #{x.message}\n #{x.backtrace.join("\n ")}."
end
@@ -359,7 +359,7 @@ module Custodian
end
# uh-oh! Resolution failed on both protocols!
- if resolution_errors.length > 0
+ if resolution_errors.length > 1
errors << "DNS Error when resolving host - #{resolution_errors.join(',')}"
end