Add wait time while starting a peer.
authorFilippos Giannakos <philipgian@grnet.gr>
Mon, 15 Apr 2013 08:30:03 +0000 (11:30 +0300)
committerFilippos Giannakos <philipgian@grnet.gr>
Fri, 17 May 2013 08:57:55 +0000 (11:57 +0300)
While starting a peer, wait a few seconds, before checking if the peer is up n
running. In high load conditions, this check was too soon and could fail,
resulting in an overall start failure.
(cherry picked from commit 1b4a1ad9cd39b620b35bd30970edda304fcb92a6)

xseg/tools/archipelago/archipelago/archipelago.py

index 0ef7cec..c11938e 100755 (executable)
@@ -59,6 +59,7 @@ def start_peer(peer):
         sys.stdout.write("\n")
         raise Error("Cannot start %s" % peer.role)
 
+    time.sleep(3)
     pid = check_pidfile(peer.role)
     if pid < 0 or not check_running(peer.executable, pid):
         sys.stdout.write(red("FAILED".ljust(SECOND_COLUMN_WIDTH)))