8000 Fix stop-master (#397) · python/buildmaster-config@c76a343 · GitHub
[go: up one dir, main page]

Skip to content

Commit c76a343

Browse files
authored
Fix stop-master (#397)
1 parent 7f9c952 commit c76a343

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ PYTHON_VERSION=3.9
22
SYSTEM_PYTHON=python$(PYTHON_VERSION)
33
VENV_DIR=./venv
44
PIP=$(VENV_DIR)/bin/pip
5+
# make stop-server kills all processes named "python"
6+
PKILL_NAME="python"
57
BUILDBOT=$(VENV_DIR)/bin/buildbot
68
VENV_CHECK=$(VENV_DIR)/lib/python$(PYTHON_VERSION)/site-packages/buildbot/master.py
9+
USER=buildbot
710
LOGLINES=50
811

912
# Setup targets
@@ -61,10 +64,10 @@ stop-master: run-target
6164
# but it never completes. The server stays forever in this state: it is
6265
# still "running" but no longer schedules new jobs. Kill the process
6366
# to make sure that it goes bad to a known state (don't run anymore).
64-
echo "Buildbot processes:"
65-
pgrep buildbot
67+
echo "Buildbot processes (look for process name: $(PKILL_NAME))"
68+
pgrep -u $(USER) $(PKILL_NAME) ||:
6669
echo "Send SIGKILL to remaining buildbot processes (if any)"
67-
pkill -KILL buildbot
70+
pkill -KILL -u $(USER) $(PKILL_NAME) ||:
6871

6972
run-target: $(VENV_CHECK)
7073
$(BUILDBOT) $(TARGET) master; tail -n$(LOGLINES) master/twistd.log

0 commit comments

Comments
 (0)
0