From 983a5a626196fee6715134afe2707e97e9b74f88 Mon Sep 17 00:00:00 2001 From: yihuang Date: Wed, 24 Jul 2024 16:51:44 +0800 Subject: [PATCH] Problem: testground image don't have tmp directory (#1521) * Problem: testground image don't have tmp directory Solution: - create the directory inside the image, it's required by cronosd * fix image --- nix/testground-image.nix | 8 +++++++- testground/benchmark/compositions/docker-compose.jsonnet | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/nix/testground-image.nix b/nix/testground-image.nix index 9058412f33..5644a3f78c 100644 --- a/nix/testground-image.nix +++ b/nix/testground-image.nix @@ -1,4 +1,4 @@ -{ dockerTools, cronos-matrix, testground-testcase }: +{ dockerTools, runCommandLocal, cronos-matrix, testground-testcase }: let patched-cronosd = cronos-matrix.cronosd.overrideAttrs (oldAttrs: { patches = oldAttrs.patches or [ ] ++ [ @@ -6,12 +6,18 @@ let ]; }); in +let + tmpDir = runCommandLocal "tmp" { } '' + mkdir -p $out/tmp/ + ''; +in dockerTools.buildLayeredImage { name = "cronos-testground"; created = "now"; contents = [ testground-testcase patched-cronosd + tmpDir ]; config = { Expose = [ 9090 26657 26656 1317 26658 26660 26659 30000 ]; diff --git a/testground/benchmark/compositions/docker-compose.jsonnet b/testground/benchmark/compositions/docker-compose.jsonnet index bec5e017f7..e3879941d8 100644 --- a/testground/benchmark/compositions/docker-compose.jsonnet +++ b/testground/benchmark/compositions/docker-compose.jsonnet @@ -6,7 +6,6 @@ std.manifestYamlDoc({ container_name: 'testplan-' + i, volumes: [ @'${DATADIR:-/tmp/data/out}:/data', - '/tmp:/tmp', ], environment: { JOB_COMPLETION_INDEX: i,