osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/38442?usp=email )
Change subject: jobs/osmo-gsm-tester-builder: build in docker
......................................................................
jobs/osmo-gsm-tester-builder: build in docker
Build Osmocom programs in docker (debian bookworm), so they link
against libraries available when trying to run the programs later on.
Without this we get errors like to following when
osmo-gsm-tester-virtual runs in docker with debian bookworm (after
recent change, before that it used debian buster):
osmo-msc: error while loading shared libraries: libasan.so.5: cannot open shared object file: No such file or directory
Fixes: OS#6126
Change-Id: I109132fbb7b459652efafad4484c3fc01293bd3f
---
M jobs/osmo-gsm-tester-builder.yml
1 file changed, 25 insertions(+), 3 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/jobs/osmo-gsm-tester-builder.yml b/jobs/osmo-gsm-tester-builder.yml
index ec9c29f..fdff300 100644
--- a/jobs/osmo-gsm-tester-builder.yml
+++ b/jobs/osmo-gsm-tester-builder.yml
@@ -48,8 +48,26 @@
node: osmo-gsm-tester-build
builders:
- shell: |
- set -e -x
- ./osmo-gsm-tester/contrib/jenkins-build-{repo}.sh
+ rm -rf docker-playground
+ git clone \
+ --depth=1 \
+ --branch="$DOCKER_PLAYGROUND_BRANCH" \
+ https://gerrit.osmocom.org/docker-playground \
+ docker-playground
+ git -C docker-playground log --oneline
+ make -C docker-playground/osmo-gsm-tester
+
+ docker run \
+ --rm \
+ -v "$PWD:/build" \
+ -v "/opt/poky-sdk:/opt/poky-sdk" \
+ -v "/opt/poky-oc2g:/opt/poky-oc2g" \
+ --user build \
+ "$USER"/osmo-gsm-tester \
+ sh -e -x -c "
+ cd /build
+ ./osmo-gsm-tester/contrib/jenkins-build-{repo}.sh
+ "
triggers:
- reverse:
jobs: '{triggered-by}'
@@ -67,8 +85,12 @@
parameters:
- string:
name: "OSMO_GSM_TESTER_BRANCH"
- default: "origin/master"
+ default: "master"
description: "Which branch/sha should be used for testing"
+ - string:
+ name: "DOCKER_PLAYGROUND_BRANCH"
+ default: "master"
+ description: "Which branch/sha should be used for building the osmo-gsm-tester docker container"
- add_param_build_branch:
name: OSMO_GSM_TESTER_BUILD_libosmo-abis
- add_param_build_branch:
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/38442?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I109132fbb7b459652efafad4484c3fc01293bd3f
Gerrit-Change-Number: 38442
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/38440?usp=email )
Change subject: osmo-gsm-tester: use debian-bookworm-build
......................................................................
osmo-gsm-tester: use debian-bookworm-build
osmo-gsm-tester was the last user of debian-buster-jenkins, and it just
broke again for some reason. Instead of adjusting debian-buster-jenkins
again this time, I've adjusted osmo-gsm-tester to run with
debian-bookworm-build instead so we can avoid the maintenance effort of
keeping debian-buster-jenkins working, as well as the additional time
needed to build this container.
We held off from upgrading to debian-bookworm-build, because no mongodb
debian packages are available for bookworm. However in the meantime we
have just installed the bullseye mongodb package in bookworm together
with the older libssl from bullseye that it was build against - we did
this in other containers already, so do this here too.
Other adjustments:
* Pip needs --break-system-packages now (it is fine in a docker
container)
* Patchelf in bookworm is >= 0.11 (getting installed in the apt install
call already), so we don't need to build it from source anymore.
* Remove 'if [ "$(arch)" = "x86_64" ];' around the mongodb code. This
was needed earlier when we used to build this container on arm devices
too, but AFAIK we don't do that anymore and it wasn't really useful in
the first place. (And if we do we can bring this back easily.)
* Add rpm2cpio and cpio, because these are used during the
osmo-gsm-tester_build-osmocom-bb job which will use this docker image
with an upcoming osmo-ci patch (currently it is not using docker to
build the Osmocom programs, but that leads to missing library errors
once we upgrade to bookworm here). IMHO the build process should be
reworked so that this is not necessary, but given that osmo-gsm-tester
isn't really maintained currently, this is the bare minimum needed to
migrate it away from debian buster.
Related: OS#6126
Change-Id: I5ed3b92f07f23c96b8f953e0a93991cc89476a12
---
M osmo-gsm-tester/Dockerfile
1 file changed, 21 insertions(+), 30 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/osmo-gsm-tester/Dockerfile b/osmo-gsm-tester/Dockerfile
index 0105e47..b38706d 100644
--- a/osmo-gsm-tester/Dockerfile
+++ b/osmo-gsm-tester/Dockerfile
@@ -1,8 +1,7 @@
ARG USER
-FROM $USER/debian-buster-jenkins
+FROM $USER/debian-bookworm-build
ARG OGT_MASTER_ADDR="172.18.50.2"
-
# Create jenkins user
RUN useradd -ms /bin/bash jenkins
# Create osmo-gsm-tester group and add user to it
@@ -12,6 +11,7 @@
# install osmo-gsm-tester dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
+ cpio \
dbus \
tcpdump \
sqlite3 \
@@ -25,6 +25,7 @@
python3-watchdog \
ofono \
patchelf \
+ rpm2cpio \
sudo \
libcap2-bin \
python3-pip \
@@ -33,7 +34,7 @@
locales
# install osmo-gsm-tester pip dependencies
-RUN pip3 install \
+RUN pip3 install --break-system-packages \
"git+https://github.com/podshumok/python-smpplib.git@master#egg=smpplib" \
pydbus \
pyusb \
@@ -63,16 +64,6 @@
update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
-# We require a newer patchelf 0.11 (OS#4389)
-ADD https://github.com/NixOS/patchelf/archive/0.11.tar.gz /tmp/patchelf-0.11.tar.gz
-RUN cd /tmp && \
- tar -zxf /tmp/patchelf-0.11.tar.gz && \
- cd patchelf-0.11 && \
- autoreconf -fi && \
- ./configure --prefix=/usr/local && \
- make && \
- make install
-
RUN apt-get update && \
apt-get install -y --no-install-recommends \
telnet \
@@ -109,23 +100,23 @@
gnuradio && \
apt-get clean
-# install open5gs dependencies: (mongodb not available in Debian)
-# systemctl stuff: workaround for https://jira.mongodb.org/browse/SERVER-54386
-ADD https://www.mongodb.org/static/pgp/server-4.4.asc /tmp/mongodb-server-4.4.asc
-RUN if [ "$(arch)" = "x86_64" ]; then \
- apt-key add /tmp/mongodb-server-4.4.asc && \
- echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" \
- > /etc/apt/sources.list.d/mongodb-org-4.4.list; \
- fi
-RUN if [ "$(arch)" = "x86_64" ]; then \
- apt-get update && \
- systemctl_path=$(which systemctl) && \
- mv $systemctl_path /tmp/systemctl && \
- apt-get install -y --no-install-recommends mongodb-org && \
- apt-get clean && \
- mv /tmp/systemctl $systemctl_path && \
- sed -i "s/127.0.0.1/$OGT_MASTER_ADDR/g" /etc/mongod.conf; \
- fi
+# Add mongodb using the package from bullseye since a bookworm mongodb-org
+# package is not available. Furthermore, manually install required libssl1.1.
+RUN set -x && \
+ mkdir -p /tmp/mongodb && \
+ cd /tmp/mongodb && \
+ wget "https://pgp.mongodb.com/server-5.0.asc" -O "/mongodb.key" && \
+ wget "http://security.debian.org/debian-security/pool/updates/main/o/openssl/libs…" && \
+ dpkg -i "libssl1.1_1.1.1n-0+deb10u6_amd64.deb" && \
+ echo "deb [signed-by=/mongodb.key] http://repo.mongodb.org/apt/debian bullseye/mongodb-org/5.0 main" \
+ > /etc/apt/sources.list.d/mongodb-org.list && \
+ apt-get update && \
+ apt-get install -y mongodb-org && \
+ apt-get clean && \
+ cd / && \
+ rm -rf /tmp/mongodb && \
+ rm /etc/apt/sources.list.d/mongodb-org.list && \
+ sed -i "s/127.0.0.1/$OGT_MASTER_ADDR/g" /etc/mongod.conf
# install open5gs dependencies:
RUN if [ "$(arch)" = "x86_64" ]; then \
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/38440?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I5ed3b92f07f23c96b8f953e0a93991cc89476a12
Gerrit-Change-Number: 38440
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38425?usp=email )
Change subject: testenv: podman: restart_count in container_name
......................................................................
testenv: podman: restart_count in container_name
When running testsuites with multiple configurations in a row, as it is
the case with the ttcn3-ggsn jobs in jenkins, the podman container gets
restarted whenever switching to the next config.
Use a different name for each container by appending a restart count.
This should fix that podman sometimes didn't fully shutdown the
container yet and complains that the container name is already in use.
This happens even though we use "podman kill" and "podman wait" on the
previous container. When checking later, the container is really gone
and the same name can be used, it seems that it just needs some more
time to shutdown in some cases.
Fix for:
> Error: error creating container storage: the container name
> "testenv-ggsn_tests-osmo_ggsn_-osmocom-nightly-20241012-0752-2eb85125" is
> already in use by "8b7ea42371a922ffbf4e966b853124b98cd25c9905ae443fefb4115a103d7779".
> You have to remove that container to be able to reuse that name.: that name is already in use
Related: https://github.com/containers/podman/issues/2553
Related: https://jenkins.osmocom.org/jenkins/job/ttcn3-ggsn-test/2674/console
Change-Id: Ia791be2fee69765293ce7a7a058319c92bb92714
---
M _testenv/testenv/podman.py
1 file changed, 5 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/_testenv/testenv/podman.py b/_testenv/testenv/podman.py
index bd1e8d8..683f468 100644
--- a/_testenv/testenv/podman.py
+++ b/_testenv/testenv/podman.py
@@ -20,6 +20,7 @@
apt_dir_var_lib = None
feed_watchdog_process = None
run_shell_on_stop = False
+restart_count = 0
def image_exists():
@@ -190,7 +191,8 @@
testdir_topdir = testenv.testdir.testdir_topdir
osmo_dev_dir = testenv.osmo_dev.get_osmo_dev_dir()
- container_name = testenv.testdir.prefix
+ container_name = f"{testenv.testdir.prefix}-{restart_count}"
+
# Custom seccomp profile that allows io_uring
seccomp = os.path.join(testenv.data_dir, "podman/seccomp.json")
@@ -287,6 +289,7 @@
def stop(restart=False):
global container_name
global run_shell_on_stop
+ global restart_count
if not is_running():
return
@@ -316,4 +319,5 @@
container_name = None
if restart:
+ restart_count += 1
start()
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38425?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia791be2fee69765293ce7a7a058319c92bb92714
Gerrit-Change-Number: 38425
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ci/+/38432?usp=email )
Change subject: jobs: Move ttcn3-stp-test* to use testenv
......................................................................
Patch Set 1:
(2 comments)
Patchset:
PS1:
besides "-c generic": LGTM. Thanks!
File jobs/ttcn3-testsuites-testenv.yml:
https://gerrit.osmocom.org/c/osmo-ci/+/38432/comment/ed8ba569_460c5755?usp=… :
PS1, Line 231: args: -b osmocom:nightly --io-uring -c generic
Remove "-c generic". This is used for sgsn above, because it has multiple testenv.cfg files (generic, sns to match previous docker-playground configuration)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/38432?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ifdee05395c4c80a3c9cb60828c268bcbb8f430a8
Gerrit-Change-Number: 38432
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 17 Oct 2024 07:52:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: lynxis lazus.
pespin has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/38444?usp=email )
Change subject: GTP: CreatePDPContext: only use IMEISV IE when IMEISV is known
......................................................................
Patch Set 1:
(1 comment)
File src/sgsn/sgsn_libgtp.c:
https://gerrit.osmocom.org/c/osmo-sgsn/+/38444/comment/94ee6d4b_22002bdc?us… :
PS1, Line 303: if (mmctx->imei[0] != 0x00) {
Can't an IMEI have a 0 digit?
If it's a string, then use '\0' to clarify.
In any case, this is really confusing, some comment explaining this may be welcome.
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/38444?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I812af1e702e77214244f32ae65663c1a03b23962
Gerrit-Change-Number: 38444
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Wed, 16 Oct 2024 18:05:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No