* [PATCH] Use WORKERNAME instead of hostname
@ 2022-08-07 17:48 Mark Wielaard
0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2022-08-07 17:48 UTC (permalink / raw)
To: buildbot; +Cc: Mark Wielaard
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-07 17:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 17:48 [PATCH] Use WORKERNAME instead of hostname 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).