gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-deployment] branch master updated: more diagnostics


From: gnunet
Subject: [GNUnet-SVN] [taler-deployment] branch master updated: more diagnostics from failed-to-restart services
Date: Tue, 09 Jan 2018 16:06:06 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new cd9bee6  more diagnostics from failed-to-restart services
cd9bee6 is described below

commit cd9bee6b524245634c89fb003504ed4d51046754
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Jan 9 16:05:25 2018 +0100

    more diagnostics from failed-to-restart services
---
 buildbot/checks.sh | 73 ++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 51 insertions(+), 22 deletions(-)

diff --git a/buildbot/checks.sh b/buildbot/checks.sh
index 39f52b6..779d845 100755
--- a/buildbot/checks.sh
+++ b/buildbot/checks.sh
@@ -8,50 +8,79 @@ if test $active = "test-blue"; then
   nonactive="green"
 fi
 
-if ! test 200 = $(curl \
+error_stringify ()
+{
+  case $1 in
+    28) echo "connection timed out" ;;
+     7) echo "failed to connect to host" ;;
+     *) echo "unknown, see curl man page" ;;
+  esac
+}
+
+error_fmt="%s (http status code: %s)/(curl exit code: %s - %s)\n"
+
+http_status_code=$(curl \
   -H "X-Taler-Deployment-Color: $nonactive" \
   -s https://exchange.test.taler.net/ -o /dev/null \
-  -w "%{http_code}"); then
-  echo Exchange did not restart correctly
+  -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+  printf "%s (http status code: %s)/(curl exit code: %s - %s)\n" \
+  "Exchange did not restart correctly" \
+  $http_status_code $? $(error_stringify $?)
   exit 1
 fi
 
-if ! test 200 = $(curl \
+http_status_code=$(curl \
   -H "X-Taler-Deployment-Color: $nonactive" \
   -s http://backend.test.taler.net/ -o /dev/null \
-  -w "%{http_code}"); then
-  echo Merchant backend did not restart correctly
+  -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+  printf $error_fmt \
+  "Merchant backend did not restart correctly" \
+  $http_status_code $? $(error_stringify $?)
   exit 1
 fi
 
-if ! test 200 = $(curl \
+http_status_code=$(curl \
   -H "X-Taler-Deployment-Color: $nonactive" \
-  -s https://shop.test.taler.net/ -o /dev/null \
-  -w "%{http_code}"); then
-  echo Blog did not restart correctly
+  -s http://shop.test.taler.net/ -o /dev/null \
+  -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+  printf $error_fmt \
+  "Blog did not restart correctly" \
+  $http_status_code $? $(error_stringify $?)
   exit 1
 fi
 
-if ! test 200 = $(curl \
+http_status_code=$(curl \
   -H "X-Taler-Deployment-Color: $nonactive" \
-  -s https://donations.test.taler.net/ -o /dev/null \
-  -w "%{http_code}"); then
-  echo Donations shop did not restart correctly
+  -s http://donations.test.taler.net/ -o /dev/null \
+  -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+  printf $error_fmt \
+  "Donations shop did not restart correctly" \
+  $http_status_code $? $(error_stringify $?)
   exit 1
 fi
 
-if ! test 302 = $(curl \
+http_status_code=$(curl \
   -H "X-Taler-Deployment-Color: $nonactive" \
-  -s https://bank.test.taler.net/ -o /dev/null \
-  -w "%{http_code}"); then
-  echo Bank did not restart correctly
+  -s http://bank.test.taler.net/ -o /dev/null \
+  -w "%{http_code}")
+if ! test 302 = $http_status_code; then
+  printf $error_fmt \
+  "Bank did not restart correctly" \
+  $http_status_code $? $(error_stringify $?)
   exit 1
 fi
 
-if ! test 200 = $(curl \
+http_status_code=$(curl \
   -H "X-Taler-Deployment-Color: $nonactive" \
-  -s https://test.taler.net/en/index.html -o /dev/null \
-  -w "%{http_code}"); then
-  echo Landing page did not restart correctly
+  -s http://test.taler.net/ -o /dev/null \
+  -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+  printf $error_fmt \
+  "Landing page not restart correctly" \
+  $http_status_code $? $(error_stringify $?)
   exit 1
 fi

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]