phase1,phase2: fix reconfig command by creating twistd.pid
authorPetr Štetiar <ynezz@true.cz>
Fri, 19 Mar 2021 20:54:30 +0000 (21:54 +0100)
committerPetr Štetiar <ynezz@true.cz>
Fri, 19 Mar 2021 20:54:30 +0000 (21:54 +0100)
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 <ynezz@true.cz>
phase1/master.cfg
phase2/master.cfg

index 53d1812fd081362fc1bb142a1446d4823c6792ed..363d77e42fb4be3492f41ec683d4f525d5481998 100644 (file)
@@ -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.
 
index a54c191c982c8d4ee485b2ba5e2d53b9dc7a8376..4d5e595a8da8fc91f0cccaed129f3b5345211c98 100644 (file)
@@ -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"))