public inbox for buildbot@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Always force new buildbot-worker creation
@ 2022-08-07 20:35 Mark Wielaard
  0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2022-08-07 20:35 UTC (permalink / raw)
  To: buildbot; +Cc: Mark Wielaard

Different buildbot-worker versions might not mix in buildbot.tac
argument processing. So remove and force recreation everytime.

Also use the fedora-rawhide buildbot-worker package again. It seems to
have been fixed.
---
 builder/containers/Containerfile-fedora-rawhide |  3 ++-
 builder/containers/bb-start.sh                  | 14 ++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/builder/containers/Containerfile-fedora-rawhide b/builder/containers/Containerfile-fedora-rawhide
index 34bfbf6..977de2b 100644
--- a/builder/containers/Containerfile-fedora-rawhide
+++ b/builder/containers/Containerfile-fedora-rawhide
@@ -14,7 +14,8 @@ RUN dnf upgrade -y && \
         xmlto xmlto-tex fop poppler-utils libxslt docbook-dtds docbook-style-xsl \
         libxml2-devel dos2unix dpkg koji python3-devel python3-koji python3-mock \
         python3-rpm python3-pyxdg mailcap openmpi-devel gdb help2man wget xxhash-devel \
-        libffi-devel pip && pip install buildbot-worker==1.8.2 && \
+        libffi-devel \
+        buildbot-worker && \
    dnf clean all
 
 # Setup user with same id as host user id.
diff --git a/builder/containers/bb-start.sh b/builder/containers/bb-start.sh
index 2abf3f0..ab0b1dc 100755
--- a/builder/containers/bb-start.sh
+++ b/builder/containers/bb-start.sh
@@ -17,12 +17,12 @@
 # all have a different WORKERNAME.
 worker_dir=shared/$WORKERNAME/worker
 tac_file=$worker_dir/buildbot.tac
-if [ ! -f $tac_file ]; then
-  mkdir -p $worker_dir
-  buildbot-worker create-worker $worker_dir $BUILDMASTER:$BUILDMASTER_PORT $WORKERNAME $WORKERPASS
-else
-  sed -ie "s/^passwd = .*/passwd = '$WORKERPASS'/" $tac_file
-fi
+
+# Always create a new tac file to force buildbot-worker update
+rm -f $tac_file
+mkdir -p $worker_dir
+buildbot-worker create-worker --force $worker_dir \
+	$BUILDMASTER:$BUILDMASTER_PORT $WORKERNAME $WORKERPASS
 
 # Fill in the info visible in the buildbot website
 # objcopy gives us the binutils version, iconv the glibc version
@@ -40,4 +40,6 @@ unset WORKERPASS
 export PATH=$CCACHE_LIBDIR:$PATH
 mkdir -p shared/$IMAGE_NAME/ccache
 export CCACHE_DIR=/home/builder/shared/$IMAGE_NAME/ccache
+
+# Use --nodaemon because we don't want to exit the container
 buildbot-worker start --nodaemon $worker_dir
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-07 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 20:35 [PATCH] Always force new buildbot-worker creation Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).