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] Use WORKERNAME instead of hostname
Date: Sun,  7 Aug 2022 19:48:15 +0200	[thread overview]
Message-ID: <20220807174815.21116-1-mark@klomp.org> (raw)

They are the same anyway, but hostname -s doesn't always work while
WORKERNAME is always passed into the environment.
---
 builder/containers/bb-start.sh | 10 ++++------
 builder/master.cfg             |  9 +--------
 2 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/builder/containers/bb-start.sh b/builder/containers/bb-start.sh
index a87a9e0..2abf3f0 100755
--- a/builder/containers/bb-start.sh
+++ b/builder/containers/bb-start.sh
@@ -7,16 +7,15 @@
 # - IMAGE_NAME - name of the image
 # - CCACHE_LIBDIR - path where to search for ccache (usually /usr/lib64/ccache)
 
-# Use the (container) hostname to create different worker dirs in case
+# Use the WORKERNAME to create different worker dirs in case
 # we have multiple containers running on the same build host (using the same
 # shared/ directory). Note that a latent worker only runs one container at
 # a time. Even if it might do multiple builds it will do those builds using
-# the same container/image. The latent worker only has one instantation of
+# the same container/image. The latent worker only has one instance of
 # the worker/container running at the same time. But multiple different
 # latent workers might be running on the same host. Those latent workers
-# should all set a different container hostname.
-hostname=$(hostname -s)
-worker_dir=shared/$hostname/worker
+# 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
@@ -29,7 +28,6 @@ fi
 # objcopy gives us the binutils version, iconv the glibc version
 echo buildbot@sourceware.org > $worker_dir/info/admin
 echo $IMAGE_NAME > $worker_dir/info/host
-echo $hostname >> $worker_dir/info/host
 gcc --version | head -1 >> $worker_dir/info/host
 objcopy --version | head -1 >> $worker_dir/info/host
 iconv --version | head -1 >> $worker_dir/info/host
diff --git a/builder/master.cfg b/builder/master.cfg
index b66506c..d8cee28 100644
--- a/builder/master.cfg
+++ b/builder/master.cfg
@@ -132,7 +132,7 @@ c['workers'].append(fedrawhide_x86_64_worker)
 
 # 3 (Fedora Core) VMs which can run container files
 # 2 can do simultanious builds, and so have 2 latent workers with different
-# hostnames, 1 is a bit larger but only does one (larger) build at a time.
+# names, 1 is a bit larger but only does one (larger) build at a time.
 # builders need to set the "container-file" property by using readContainerFile
 bb1_1_worker = worker.DockerLatentWorker("bb1-1",
                            None,
@@ -140,7 +140,6 @@ bb1_1_worker = worker.DockerLatentWorker("bb1-1",
                            docker_host="ssh://builder@bb.wildebeest.org:2021",
                            dockerfile=util.Interpolate('%(prop:container-file)s'),
                            volumes=["/home/builder/shared:/home/builder/shared"],
-                           hostname="bb1-1",
                            build_wait_timeout=0,
                            max_builds=1,
                            properties={'ncpus': 6, 'maxcpus': 8});
@@ -152,7 +151,6 @@ bb1_2_worker = worker.DockerLatentWorker("bb1-2",
                            docker_host="ssh://builder@bb.wildebeest.org:2021",
                            dockerfile=util.Interpolate('%(prop:container-file)s'),
                            volumes=["/home/builder/shared:/home/builder/shared"],
-                           hostname="bb1-2",
                            build_wait_timeout=0,
                            max_builds=1,
                            properties={'ncpus': 6, 'maxcpus': 8});
@@ -164,7 +162,6 @@ bb2_1_worker = worker.DockerLatentWorker("bb2-1",
                            docker_host="ssh://builder@bb.wildebeest.org:2022",
                            dockerfile=util.Interpolate('%(prop:container-file)s'),
                            volumes=["/home/builder/shared:/home/builder/shared"],
-                           hostname="bb2-1",
                            build_wait_timeout=0,
                            max_builds=1,
                            properties={'ncpus': 6, 'maxcpus': 8});
@@ -176,7 +173,6 @@ bb2_2_worker = worker.DockerLatentWorker("bb2-2",
                            docker_host="ssh://builder@bb.wildebeest.org:2022",
                            dockerfile=util.Interpolate('%(prop:container-file)s'),
                            volumes=["/home/builder/shared:/home/builder/shared"],
-                           hostname="bb2-2",
                            build_wait_timeout=0,
                            max_builds=1,
                            properties={'ncpus': 6, 'maxcpus': 8});
@@ -188,7 +184,6 @@ bb3_worker = worker.DockerLatentWorker("bb3",
                            docker_host="ssh://builder@bb.wildebeest.org:2023",
                            dockerfile=util.Interpolate('%(prop:container-file)s'),
                            volumes=["/home/builder/shared:/home/builder/shared"],
-                           hostname="bb3",
                            build_wait_timeout=0,
                            max_builds=1,
                            properties={'ncpus': 6, 'maxcpus': 12});
@@ -202,7 +197,6 @@ bbo1_1_worker = worker.DockerLatentWorker("bbo1-1",
                            docker_host="ssh://builder@sourceware-builder1.osuosl.org",
                            dockerfile=util.Interpolate('%(prop:container-file)s'),
                            volumes=["/home/builder/shared:/home/builder/shared"],
-                           hostname="bbo1-1",
                            build_wait_timeout=0,
                            max_builds=1,
                            properties={'ncpus': 8, 'maxcpus': 8});
@@ -214,7 +208,6 @@ bbo1_2_worker = worker.DockerLatentWorker("bbo1-2",
                            docker_host="ssh://builder@sourceware-builder1.osuosl.org",
                            dockerfile=util.Interpolate('%(prop:container-file)s'),
                            volumes=["/home/builder/shared:/home/builder/shared"],
-                           hostname="bbo1-2",
                            build_wait_timeout=0,
                            max_builds=1,
                            properties={'ncpus': 8, 'maxcpus': 16});
-- 
2.30.2


                 reply	other threads:[~2022-08-07 17:48 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=20220807174815.21116-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).