osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/docker-playground/+/42194?usp=email )
Change subject: ttcn3-bts-test: write bts logs to tmpfs
......................................................................
ttcn3-bts-test: write bts logs to tmpfs
Pau suggested in the related issue that we try to write the bts logs
into tmpfs, instead of directly to ext4. This seems to cause the slow
downs, which then result in clock skew errors.
Related: SYS#6794#note-29
Change-Id: Id9a93f7149ef7e9bfde1f4fe3a8299ba46645d50
---
M ttcn3-bts-test/jenkins.sh
1 file changed, 16 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground
refs/changes/94/42194/1
diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index 6f75266..15163bd 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -1,4 +1,9 @@
#!/bin/sh
+# Start the bts testsuite.
+# In an attempt to avoid clock skew errors (OS#6794), osmo-bts log output is
+# written to tmpfs first, and only copied to the jenkins workspace before the
+# container gets stopped.
+
TEST_CONFIGS_ALL="generic virtphy oml hopping"
TEST_CONFIGS="${TEST_CONFIGS:-"generic oml hopping"}"
@@ -66,6 +71,7 @@
--cap-add=SYS_ADMIN \
--ulimit rtprio=99 \
--ulimit core=-1 \
+ --mount type=tmpfs,dst=/tmp \
-v $VOL_BASE_DIR/bts:/data \
-v $VOL_BASE_DIR/unix:/data/unix \
-e "SLEEP_BEFORE_RESPAWN=$sleep_time_respawn" \
@@ -73,7 +79,7 @@
$DOCKER_ARGS \
$extra_args \
$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
- /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-$variant
-c /data/osmo-bts.gen.cfg >>/data/osmo-bts.log 2>&1"
+ /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-$variant
-c /data/osmo-bts.gen.cfg >>/tmp/osmo-bts.log 2>&1"
# Run bpftrace scripts (OS#6794#note-16)
if [ "$RUN_BPFTRACE" = "1" ]; then
@@ -107,6 +113,11 @@
fi
}
+stop_bts() {
+ docker exec "${BUILD_TAG}-bts" sh -c "cat /tmp/osmo-bts.log >>
/data/osmo-bts.log"
+ docker_kill_wait "${BUILD_TAG}-bts"
+}
+
start_fake_trx() {
echo Starting container with fake_trx
docker run --rm \
@@ -206,7 +217,7 @@
docker_kill_wait ${BUILD_TAG}-trxcon
docker_kill_wait ${BUILD_TAG}-fake_trx
- docker_kill_wait ${BUILD_TAG}-bts
+ stop_bts
docker_kill_wait ${BUILD_TAG}-bsc
}
@@ -232,7 +243,7 @@
start_testsuite virtphy
docker_kill_wait ${BUILD_TAG}-virtphy
- docker_kill_wait ${BUILD_TAG}-bts
+ stop_bts
docker_kill_wait ${BUILD_TAG}-bsc
}
@@ -253,7 +264,7 @@
docker_kill_wait ${BUILD_TAG}-trxcon
docker_kill_wait ${BUILD_TAG}-fake_trx
- docker_kill_wait ${BUILD_TAG}-bts
+ stop_bts
}
# Frequency hopping tests require different configuration files
@@ -276,7 +287,7 @@
docker_kill_wait ${BUILD_TAG}-trxcon
docker_kill_wait ${BUILD_TAG}-fake_trx
docker_kill_wait ${BUILD_TAG}-bsc
- docker_kill_wait ${BUILD_TAG}-bts
+ stop_bts
}
check_respawn_count() {
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/42194?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Id9a93f7149ef7e9bfde1f4fe3a8299ba46645d50
Gerrit-Change-Number: 42194
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>