Ubuntu Pastebin

Paste from martin at Mon, 19 Oct 2015 12:49:17 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
diff -Nru nova-12.0.0/debian/changelog nova-12.0.0/debian/changelog
--- nova-12.0.0/debian/changelog	2015-10-15 23:19:34.000000000 +0200
+++ nova-12.0.0/debian/changelog	2015-10-19 14:48:54.000000000 +0200
@@ -1,3 +1,12 @@
+nova (2:12.0.0-0ubuntu2) wily; urgency=medium
+
+  * debian/tests/nova-compute-daemons: Give daemon 5 seconds to start. This is
+    racy as the postinst start job is done as soon as Python starts, but that
+    still needs some time to run nova-compute. Also, don't hide the apt-get
+    output as it's important for diagnostics.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Mon, 19 Oct 2015 14:47:17 +0200
+
 nova (2:12.0.0-0ubuntu1) wily; urgency=medium
 
   * New upstream release for OpenStack Liberty.
diff -Nru nova-12.0.0/debian/tests/nova-compute-daemons nova-12.0.0/debian/tests/nova-compute-daemons
--- nova-12.0.0/debian/tests/nova-compute-daemons	2015-10-15 23:19:34.000000000 +0200
+++ nova-12.0.0/debian/tests/nova-compute-daemons	2015-10-19 14:47:04.000000000 +0200
@@ -6,14 +6,23 @@
 DAEMONS=('nova-compute-kvm' 'nova-compute-lxc' 'nova-compute-qemu')
 
 for daemon in "${DAEMONS[@]}"; do
-    apt-get install -y nova-compute $daemon 2>&1 > /dev/null
+    apt-get install -y nova-compute $daemon 2>&1
 
-    if pidof -x nova-compute > /dev/null; then
-        echo "OK"
-    else
-        echo "ERROR: NOVA-COMPUTE IS NOT RUNNING"
+    TIMEOUT=50
+    while [ "$TIMEOUT" -gt 0 ]; do
+        if pidof -x nova-compute > /dev/null; then
+            echo "OK"
+            break
+        fi
+        echo "waiting a bit..."
+        TIMEOUT=$((TIMEOUT - 1))
+        sleep 0.1
+    done
+
+    if [ "$TIMEOUT" -le 0 ]; then
+        echo "ERROR: NOVA-COMPUTE FOR $daemon IS NOT RUNNING"
         exit 1
     fi
 
-    apt-get remove -y $daemon nova-compute 2>&1 > /dev/null
+    apt-get remove -y $daemon nova-compute 2>&1
 done
Download as text