Skip to content

Commit 804061d

Browse files
authored
Merge pull request #1181 from buildkite/pdp-1415-using-nvme-storage-appears-to-fail-in-v600
2 parents 4625374 + 34841a1 commit 804061d

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.buildkite/steps/launch.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ if [[ "$os" == "windows" ]]; then
3131
fi
3232

3333
if [[ "$arch" == "arm64" ]]; then
34-
instance_type="t4g.small"
34+
instance_type="m6gd.medium"
35+
enable_instance_storage="true"
3536
fi
3637

3738
cat << EOF > config.json
@@ -95,6 +96,10 @@ cat << EOF > config.json
9596
{
9697
"ParameterKey": "ScaleInIdlePeriod",
9798
"ParameterValue": "60"
99+
},
100+
{
101+
"ParameterKey": "EnableInstanceStorage",
102+
"ParameterValue": "${enable_instance_storage:-false}"
98103
}
99104
]
100105
EOF

goss.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,10 @@ command:
140140
/usr/local/bin/docker-low-disk-gc:
141141
exit-status: 0
142142

143+
# test that we can build a docker image
143144
docker buildx build -f tests/Dockerfile --progress=plain -t buildkite-postgres:latest tests:
144145
exit-status: 0
145-
timeout: 30000
146+
timeout: 60000
146147

147148
# Check docker userns is enabled
148149
# Note that goss will evaluate the outer layer of templating, and docker will evaluate the second
@@ -166,7 +167,7 @@ command:
166167
# Check that docker containers can run
167168
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock docker:latest version:
168169
exit-status: 0
169-
timeout: 30000
170+
timeout: 60000
170171

171172
# Check that userns allows writing as buildkite-agent
172173
sh -c 'docker run --rm -v "$PWD:/pwd" alpine:latest touch /pwd/test && stat -c %U:%G test' && rm test:

packer/linux/conf/bin/bk-configure-docker.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ fi
3232

3333
# Move docker root to the ephemeral device
3434
if [[ "${BUILDKITE_ENABLE_INSTANCE_STORAGE:-false}" == "true" ]]; then
35+
mkdir -p /mnt/ephemeral/docker
3536
cat <<< "$(jq '."data-root"="/mnt/ephemeral/docker"' /etc/docker/daemon.json)" > /etc/docker/daemon.json
3637
fi
3738

packer/linux/conf/bin/bk-mount-instance-storage.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ exec > >(tee -a /var/log/elastic-stack.log | logger -t user-data -s 2>/dev/conso
88
# Mount instance storage if we can
99
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
1010

11-
# Move docker root to the ephemeral device
1211
if [[ "${BUILDKITE_ENABLE_INSTANCE_STORAGE:-false}" != "true" ]]; then
1312
echo "Skipping mounting instance storage"
1413
exit 0
@@ -17,8 +16,7 @@ fi
1716
#shellcheck disable=SC2207
1817
devices=($(nvme list | grep "Amazon EC2 NVMe Instance Storage" | cut -f1 -d' '))
1918

20-
if [ -z "${devices[*]}" ]
21-
then
19+
if [ -z "${devices[*]}" ]; then
2220
echo "No Instance Storage NVMe drives to mount" >&2
2321
exit 0
2422
fi

0 commit comments

Comments
 (0)