From 564eefcf29e83bd3d5481f367f7a3c102eb55fcf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Fri, 19 Mar 2021 21:54:30 +0100 Subject: [PATCH] phase1,phase2: fix reconfig command by creating twistd.pid MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Currently it's not possible to reconfig buildmaster as twistd.pid is missing so fix it by creating one manually. Signed-off-by: Petr Å tetiar --- phase1/master.cfg | 4 ++++ phase2/master.cfg | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/phase1/master.cfg b/phase1/master.cfg index 53d1812..363d77e 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -41,6 +41,10 @@ from buildbot.steps.transfer import StringDownload from buildbot.worker import Worker +if not os.path.exists("twistd.pid"): + with open("twistd.pid", "w") as pidfile: + pidfile.write("{}".format(os.getpid())) + # This is a sample buildmaster config file. It must be installed as # 'master.cfg' in your buildmaster's base directory. diff --git a/phase2/master.cfg b/phase2/master.cfg index a54c191..4d5e595 100644 --- a/phase2/master.cfg +++ b/phase2/master.cfg @@ -37,6 +37,10 @@ from buildbot.steps.transfer import StringDownload from buildbot.worker import Worker +if not os.path.exists("twistd.pid"): + with open("twistd.pid", "w") as pidfile: + pidfile.write("{}".format(os.getpid())) + ini = configparser.ConfigParser() ini.read(os.getenv("BUILDMASTER_CONFIG", "./config.ini")) -- 2.30.2