public inbox for buildbot@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: buildbot@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH] Always force new buildbot-worker creation
Date: Sun,  7 Aug 2022 22:35:59 +0200	[thread overview]
Message-ID: <20220807203559.23157-1-mark@klomp.org> (raw)

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


                 reply	other threads:[~2022-08-07 20:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220807203559.23157-1-mark@klomp.org \
    --to=mark@klomp.org \
    --cc=buildbot@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).