Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1508)

Unified Diff: masters/start_master.sh

Issue 1892643002: Reupload of "Flock master startup." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Patch up differing uses of TOPLEVEL_DIR between build/ and build_internal/. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« masters/master-common.mk ('K') | « masters/master-common-rules.mk ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: masters/start_master.sh
diff --git a/masters/start_master.sh b/masters/start_master.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d6e1d21cbdfb758aeabf6b327e62e22b6adb7961
--- /dev/null
+++ b/masters/start_master.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright (c) 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Starts a master and waits for its pidfile to become live. This was split out
+# of the Makefile in order to make a flock-able unit.
+
+set -e
+
+if [ -f twistd.pid ]; then
+ PID=`cat twistd.pid`
+ if [ -n $(ps -p$PID -o pid=) ]; then
+ echo "twistd.pid has pid $PID which is still alive. aborting."
+ exit 2
+ fi
+fi
+
+
+echo 'Now running Buildbot master.'
+python $SCRIPTS_DIR/common/twistd --no_save -y buildbot.tac
+
+echo 'Waiting for creation of twistd.pid...'
+while `test ! -f twistd.pid`; do sleep 1; done;
+
+PID=`cat twistd.pid`
+echo "twistd.pid contains new buildbot pid $PID"
« masters/master-common.mk ('K') | « masters/master-common-rules.mk ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698