Skip to content

Commit 290eaf2

Browse files
committed
Don't assume "fcci--vg-" prefix in tools/docker/entrypoint.sh
Our EC2 instance has this volume group, but other environments would not. Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent ba35df6 commit 290eaf2

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

.buildkite/al2_pipeline.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ steps:
2121
env:
2222
DOCKER_IMAGE_TAG: "$BUILDKITE_BUILD_NUMBER"
2323
EXTRAGOARGS: "-race"
24+
FICD_DM_VOLUME_GROUP: "fcci-vg"
2425
command:
2526
- ./.buildkite/setup_al2.sh
2627
- docker run --rm -v $PWD:/mnt debian:stretch-slim rm -rf /mnt/tools/image-builder/rootfs

.buildkite/al2_test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ source ./.buildkite/al2env.sh
66
export PATH=$bin_path:$PATH
77
export FIRECRACKER_CONTAINERD_RUNTIME_CONFIG_PATH=$runtime_config_path
88
export ENABLE_ISOLATED_TESTS=true
9-
export CONTAINERD_SOCKET=$dir/containerd.sock
9+
export CONTAINERD_SOCKET=$dir/containerd.sock
10+
1011
export SHIM_BASE_DIR=$dir
1112

1213
sudo -E PATH=$PATH $bin_path/firecracker-containerd --config $dir/config.toml &

.buildkite/pipeline.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,25 @@ steps:
9898
DOCKER_IMAGE_TAG: "$BUILDKITE_BUILD_NUMBER"
9999
NUMBER_OF_VMS: 100
100100
EXTRAGOARGS: "-v -count=1 -race"
101+
FICD_DM_VOLUME_GROUP: fcci-vg
101102
artifact_paths:
102103
- "runtime/logs/*"
103104
command:
104105
- make -C runtime integ-test FICD_DM_POOL=build_${BUILDKITE_BUILD_NUMBER}_runtime
105106
timeout_in_minutes: 15
106107

107-
- label: ":rotating_light: :exclamation: example tests (devmapper)"
108+
- label: ":rotating_light: :exclamation: example tests"
108109
agents:
109110
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
110111
distro: "${BUILDKITE_AGENT_META_DATA_DISTRO}"
111112
hostname: "${BUILDKITE_AGENT_META_DATA_HOSTNAME}"
112113
env:
113114
DOCKER_IMAGE_TAG: "$BUILDKITE_BUILD_NUMBER"
114115
EXTRAGOARGS: "-v -count=1"
116+
FICD_DM_VOLUME_GROUP: fcci-vg
115117
artifact_paths:
116118
- "examples/logs/*"
117119
command:
118-
- make -C examples integ-test TEST_SS=devmapper TEST_POOL=build_${BUILDKITE_BUILD_NUMBER}_example
120+
- make -C examples integ-test TEST_POOL=build_${BUILDKITE_BUILD_NUMBER}_example
119121
timeout_in_minutes: 10
120122

tools/docker/entrypoint.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ chmod a+rwx ${FICD_LOG_DIR}
55

66
mkdir -p /etc/containerd/snapshotter
77

8+
if [[ -z "$FICD_DM_VOLUME_GROUP" ]]; then
9+
pool_name="${FICD_DM_POOL}"
10+
else
11+
pool_name="$(echo "$FICD_DM_VOLUME_GROUP" | sed s/-/--/g)-${FICD_DM_POOL}"
12+
fi
13+
814
cat > /etc/containerd/snapshotter/devmapper.toml <<EOF
915
[plugins]
1016
[plugins.devmapper]
11-
pool_name = "fcci--vg-${FICD_DM_POOL}"
17+
pool_name = "${pool_name}"
1218
base_image_size = "1024MB"
1319
EOF
1420

0 commit comments

Comments
 (0)