Browse Source

Collect more information from quickstart failures

When the quickstart job fails, make sure that we get stderr from
the docker logs.  Also, add timestamps to the waiting to start
script so that we can compare when it gave up to when systems
came online.

Change-Id: I632c794de7fb792fbe7d0b8e095701a5d7fd1af7
tags/3.10.2
James E. Blair 1 month ago
parent
commit
4a719d0fe4

+ 2
- 2
doc/source/admin/examples/playbooks/wait-to-start-gearman.sh View File

@@ -4,13 +4,13 @@
4 4
 # start.
5 5
 
6 6
 wait_for_gearman() {
7
-    echo "Wait for gearman to start"
7
+    echo `date -Iseconds` "Wait for gearman to start"
8 8
     for i in $(seq 1 120); do
9 9
         cat < /dev/null > /dev/tcp/scheduler/4730 && return
10 10
         sleep 1
11 11
     done
12 12
 
13
-    echo "Timeout waiting for mysql"
13
+    echo `date -Iseconds` "Timeout waiting for gearman"
14 14
     exit 1
15 15
 }
16 16
 

+ 4
- 4
doc/source/admin/examples/playbooks/wait-to-start.sh View File

@@ -4,24 +4,24 @@
4 4
 # start.
5 5
 
6 6
 wait_for_mysql() {
7
-    echo "Wait for mysql to start"
7
+    echo `date -Iseconds` "Wait for mysql to start"
8 8
     for i in $(seq 1 120); do
9 9
         cat < /dev/null > /dev/tcp/mysql/3306 && return
10 10
         sleep 1
11 11
     done
12 12
 
13
-    echo "Timeout waiting for mysql"
13
+    echo `date -Iseconds` "Timeout waiting for mysql"
14 14
     exit 1
15 15
 }
16 16
 
17 17
 wait_for_gerrit() {
18
-    echo "Wait for zuul user to be created"
18
+    echo `date -Iseconds` "Wait for zuul user to be created"
19 19
     for i in $(seq 1 120); do
20 20
         [ $(curl -s -o /dev/null -w "%{http_code}" http://admin:secret@gerrit:8080/a/accounts/zuul/sshkeys) = "200" ] && return
21 21
         sleep 1
22 22
     done
23 23
 
24
-    echo "Timeout waiting for gerrit"
24
+    echo `date -Iseconds` "Timeout waiting for gerrit"
25 25
     exit 1
26 26
 }
27 27
 

+ 10
- 10
playbooks/quick-start/post.yaml View File

@@ -8,16 +8,16 @@
8 8
     - name: Save docker log files
9 9
       become: true
10 10
       shell: |
11
-        docker logs examples_gerrit_1 > {{ ansible_user_dir }}/logs/gerrit.log
12
-        docker logs examples_gerritconfig_1 > {{ ansible_user_dir }}/logs/gerritconfig.log
13
-        docker logs examples_zk_1 > {{ ansible_user_dir }}/logs/zk.log
14
-        docker logs examples_mysql_1 > {{ ansible_user_dir }}/logs/mysql.log
15
-        docker logs examples_scheduler_1 > {{ ansible_user_dir }}/logs/scheduler.log
16
-        docker logs examples_web_1 > {{ ansible_user_dir }}/logs/web.log
17
-        docker logs examples_executor_1 > {{ ansible_user_dir }}/logs/executor.log
18
-        docker logs examples_node_1 > {{ ansible_user_dir }}/logs/node.log
19
-        docker logs examples_launcher_1 > {{ ansible_user_dir }}/logs/launcher.log
20
-        docker logs examples_logs_1 > {{ ansible_user_dir }}/logs/logs.log
11
+        docker logs examples_gerrit_1 > {{ ansible_user_dir }}/logs/gerrit.log 2>&1
12
+        docker logs examples_gerritconfig_1 > {{ ansible_user_dir }}/logs/gerritconfig.log 2>&1
13
+        docker logs examples_zk_1 > {{ ansible_user_dir }}/logs/zk.log 2>&1
14
+        docker logs examples_mysql_1 > {{ ansible_user_dir }}/logs/mysql.log 2>&1
15
+        docker logs examples_scheduler_1 > {{ ansible_user_dir }}/logs/scheduler.log 2>&1
16
+        docker logs examples_web_1 > {{ ansible_user_dir }}/logs/web.log 2>&1
17
+        docker logs examples_executor_1 > {{ ansible_user_dir }}/logs/executor.log 2>&1
18
+        docker logs examples_node_1 > {{ ansible_user_dir }}/logs/node.log 2>&1
19
+        docker logs examples_launcher_1 > {{ ansible_user_dir }}/logs/launcher.log 2>&1
20
+        docker logs examples_logs_1 > {{ ansible_user_dir }}/logs/logs.log 2>&1
21 21
     - name: Copy docker log files to executor
22 22
       synchronize:
23 23
         mode: pull

Loading…
Cancel
Save