Browse Source

Debug: give better bootstrap error messages

teor 5 years ago
parent
commit
ef92c76684
2 changed files with 9 additions and 3 deletions
  1. 2 1
      lib/chutney/TorNet.py
  2. 7 2
      tools/bootstrap-network.sh

+ 2 - 1
lib/chutney/TorNet.py

@@ -1092,7 +1092,8 @@ class Network(object):
             b.postConfig(network)
 
     def status(self):
-        statuses = [n.getController().check() for n in self._nodes]
+        statuses = [n.getController().check(listNonRunning=True)
+                    for n in self._nodes]
         n_ok = len([x for x in statuses if x])
         print("%d/%d nodes are running" % (n_ok, len(self._nodes)))
         return n_ok == len(self._nodes)

+ 7 - 2
tools/bootstrap-network.sh

@@ -56,5 +56,10 @@ echo "$myname: bootstrapping network: $flavour"
 
 "$CHUTNEY" start "$CHUTNEY_NETWORK"
 sleep 1
-"$CHUTNEY" status "$CHUTNEY_NETWORK"
-#echo "tail -F net/nodes/*/notice.log"
+if ! "$CHUTNEY" status "$CHUTNEY_NETWORK"; then
+    # Try to work out why the start or status command is failing
+    CHUTNEY_DEBUG=1 "$CHUTNEY" start "$CHUTNEY_NETWORK"
+    # Wait a little longer, just in case
+    sleep 5
+    CHUTNEY_DEBUG=1 "$CHUTNEY" status "$CHUTNEY_NETWORK"
+fi