From 644a62463a5a26f65e7707416db2dd748dced5c6 Mon Sep 17 00:00:00 2001 From: Nils Wireklint Date: Tue, 6 Feb 2024 12:06:54 +0100 Subject: [PATCH] UNCATEGORIZED WORK --- BUILD.bazel | 12 ++++++++++-- bare/config/runner.jsonnet | 13 ------------- bare/config/worker.jsonnet | 3 +++ docker-compose/config/runner-ubuntu22-04.jsonnet | 13 ------------- .../config/worker-fuse-ubuntu22-04.jsonnet | 3 +++ 5 files changed, 16 insertions(+), 28 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 1ef1e5d4..03c970ed 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,6 +1,5 @@ load("@aspect_bazel_lib//lib:run_binary.bzl", "run_binary") load("@bazel_gazelle//:def.bzl", "gazelle") -load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier") # gazelle:prefix github.com/buildbarn/bb-deployments # gazelle:exclude dummy_for_dependencies.go @@ -18,5 +17,14 @@ run_binary( "no-cache": "1", }, tool = ":ls-proc", - srcs = ["usr/bin/env"], + srcs = [ + # env is required in path resolution for chroot actions. + "usr/bin/env", + # Not strictly needed, but symmetric with sys and proc. + "dev/dummy", + # Send a directory for /sys and /proc + # Bazel wants a file for it to send the directory. + "sys/dummy", + "proc/dummy", + ], ) diff --git a/bare/config/runner.jsonnet b/bare/config/runner.jsonnet index a01863d9..82dfa195 100644 --- a/bare/config/runner.jsonnet +++ b/bare/config/runner.jsonnet @@ -7,17 +7,4 @@ local common = import 'common.libsonnet'; listenPaths: ['worker/runner'], authenticationPolicy: { allow: {} }, }], - chrootIntoInputRoot: true, - inputRootMounts: [ - { - mountpoint: 'proc', - source: '/proc', - filesystemType: 'proc', - }, - { - mountpoint: 'sys', - source: '/sys', - filesystemType: 'sysfs', - }, - ], } diff --git a/bare/config/worker.jsonnet b/bare/config/worker.jsonnet index 7c981d52..2eebc39c 100644 --- a/bare/config/worker.jsonnet +++ b/bare/config/worker.jsonnet @@ -26,6 +26,9 @@ local common = import 'common.libsonnet'; 'zero', ], concurrency: 8, + environment_variables: { + PATH: '/usr/bin', + }, platform: {}, workerId: { datacenter: 'paris', diff --git a/docker-compose/config/runner-ubuntu22-04.jsonnet b/docker-compose/config/runner-ubuntu22-04.jsonnet index e9f7685b..7f08b6da 100644 --- a/docker-compose/config/runner-ubuntu22-04.jsonnet +++ b/docker-compose/config/runner-ubuntu22-04.jsonnet @@ -7,17 +7,4 @@ local common = import 'common.libsonnet'; listenPaths: ['/worker/runner'], authenticationPolicy: { allow: {} }, }], - chrootIntoInputRoot: true, - inputRootMounts: [ - { - mountpoint: 'proc', - source: '/proc', - filesystemType: 'proc', - }, - { - mountpoint: 'sys', - source: '/sys', - filesystemType: 'sysfs', - }, - ], } diff --git a/docker-compose/config/worker-fuse-ubuntu22-04.jsonnet b/docker-compose/config/worker-fuse-ubuntu22-04.jsonnet index d93d7af6..92734deb 100644 --- a/docker-compose/config/worker-fuse-ubuntu22-04.jsonnet +++ b/docker-compose/config/worker-fuse-ubuntu22-04.jsonnet @@ -75,6 +75,9 @@ local common = import 'common.libsonnet'; 'urandom', 'zero', ], + environment_variables: { + PATH: '/usr/bin', + }, platform: { properties: [ { name: 'OSFamily', value: 'linux' },