From 7bbf9d4b8a8a4c11230e104480ac96ddb7eace4c Mon Sep 17 00:00:00 2001 From: Trevor Guidry Date: Fri, 24 May 2024 10:08:11 -0500 Subject: [PATCH] SERVER-90857 Set docker data dir before antithesis suites run (#22547) GitOrigin-RevId: 54d3202074f8b0711a570fd0ec2c3313a07646dc --- evergreen/antithesis_image_build_and_push.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/evergreen/antithesis_image_build_and_push.sh b/evergreen/antithesis_image_build_and_push.sh index b0510f55fb6..0799ef97206 100644 --- a/evergreen/antithesis_image_build_and_push.sh +++ b/evergreen/antithesis_image_build_and_push.sh @@ -28,6 +28,20 @@ sudo docker logout sudo docker rm $(docker ps -a -q) --force || echo "No pre-existing containers" sudo docker network prune --force +# Temporary fix until DEVPROD-6961 is complete +# move docker data dir out of the root partition +sudo service docker stop +sudo mkdir -p /data/mci/docker +if ! sudo jq -e . /etc/docker/daemon.json; then + echo "docker daemon.json did not exist or was invalid" + echo "setting docker daemon.json to {}" + sudo sh -c 'echo "{}" > /etc/docker/daemon.json' +fi +MODIFIED_JSON=$(sudo jq '."data-root" |= "/data/mci/docker"' /etc/docker/daemon.json) +sudo echo "${MODIFIED_JSON}" | sudo tee /etc/docker/daemon.json +echo "docker daemon.json: set data-root to /data/mci/docker" +sudo service docker start + # Login echo "${antithesis_repo_key}" > mongodb.key.json cat mongodb.key.json | sudo docker login -u _json_key https://us-central1-docker.pkg.dev --password-stdin