fixeria has submitted this change. (
https://gerrit.osmocom.org/c/docker-playground/+/37270?usp=email )
Change subject: ttcn3-s1gw-test: fix using unassigned addr for osmo-s1gw
......................................................................
ttcn3-s1gw-test: fix using unassigned addr for osmo-s1gw
The S1GW container gets assigned the primary addr 172.18.10.100/24
by docker_network_params(). The secondary addr 172.18.10.200/24,
which is used for eNB connections, needs to be assigned manually.
This patch finally makes ttcn3-s1gw-test pass.
Change-Id: I109a5feaca5acf050008e883cc8b4e1e28beebab
Related: SYS#6772
---
M ttcn3-s1gw-test/jenkins.sh
A ttcn3-s1gw-test/s1gw.sh
2 files changed, 29 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/ttcn3-s1gw-test/jenkins.sh b/ttcn3-s1gw-test/jenkins.sh
index 9fcf5f1..78a9624 100755
--- a/ttcn3-s1gw-test/jenkins.sh
+++ b/ttcn3-s1gw-test/jenkins.sh
@@ -14,6 +14,7 @@
write_mp_osmo_repo "$VOL_BASE_DIR/s1gw-tester/S1GW_Tests.cfg"
mkdir $VOL_BASE_DIR/s1gw
+cp s1gw.sh $VOL_BASE_DIR/s1gw/
cp osmo-s1gw.config $VOL_BASE_DIR/s1gw/
network_create
@@ -23,10 +24,13 @@
docker run --rm \
$(docker_network_params $SUBNET 100) \
--ulimit core=-1 \
+ --cap-add=NET_ADMIN \
+ -e "ERL_FLAGS=-config /data/osmo-s1gw.config" \
-v $VOL_BASE_DIR/s1gw:/data \
--name ${BUILD_TAG}-s1gw -d \
$DOCKER_ARGS \
- $REPO_USER/osmo-s1gw-$IMAGE_SUFFIX
+ $REPO_USER/osmo-s1gw-$IMAGE_SUFFIX \
+ /bin/sh -c "/data/s1gw.sh > /data/osmo-s1gw.log 2>&1"
# Give some time to osmo-s1gw to be fully started; it's a bit slow...
sleep 2
diff --git a/ttcn3-s1gw-test/s1gw.sh b/ttcn3-s1gw-test/s1gw.sh
new file mode 100755
index 0000000..e212aa2
--- /dev/null
+++ b/ttcn3-s1gw-test/s1gw.sh
@@ -0,0 +1,8 @@
+#!/bin/sh -ex
+
+# the subnet prefix is to be modified by network_replace_subnet_in_configs()
+ip addr add 172.18.10.100/24 dev eth0 || true # primary address already set by
docker_network_params()
+ip addr add 172.18.10.200/24 dev eth0 # secondary address for eNB -> S1GW
connections
+
+# drop the root privileges and finally start osmo-s1gw
+su build -c "/tmp/osmo-s1gw/_build/default/bin/osmo-s1gw"
--
To view, visit
https://gerrit.osmocom.org/c/docker-playground/+/37270?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I109a5feaca5acf050008e883cc8b4e1e28beebab
Gerrit-Change-Number: 37270
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged