pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38452?usp=email )
Change subject: sgsn: Improve validation of TLA encoded in RAB Ass Req
......................................................................
sgsn: Improve validation of TLA encoded in RAB Ass Req
Validate received TLA in RAB Ass Req according to confguration and test
expectancies.
Related: OS#6508
Related: SYS#7119
Change-Id: I725bf39c5564fb320954fc9e387ac569fc1a0136
---
M sgsn/BSSGP_ConnHdlr.ttcn
M sgsn/SGSN_Tests_Iu.ttcn
2 files changed, 65 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/52/38452/1
diff --git a/sgsn/BSSGP_ConnHdlr.ttcn b/sgsn/BSSGP_ConnHdlr.ttcn
index e6503ac..a966a43 100644
--- a/sgsn/BSSGP_ConnHdlr.ttcn
+++ b/sgsn/BSSGP_ConnHdlr.ttcn
@@ -103,6 +103,8 @@
/* only in IuPS / RANAP case */
SCCP_PAR_Address sccp_addr_local optional,
SCCP_PAR_Address sccp_addr_peer optional,
+ /* Whether to expect an specific addr format in RAB Ass Req: true = X.213, false = raw IPv4, omit = don't care */
+ boolean ranap_exp_itu_x213_addr_format optional,
/* Whether to encode HNBGW addr with ITU X.213 format when sending RAB Ass Resp: */
boolean ranap_use_itu_x213_addr_format,
octetstring ranap_itu_x213_addr_format_padding
@@ -129,6 +131,7 @@
t_guard := t_guard,
sccp_addr_local := omit,
sccp_addr_peer := omit,
+ ranap_exp_itu_x213_addr_format := omit,
ranap_use_itu_x213_addr_format := false,
ranap_itu_x213_addr_format_padding := ''O
}
@@ -698,22 +701,38 @@
}
}
+/* Validate received IP address + TEID from SGSN is the one we
+ * did set up from the GGSN, since the SGSN is expected to do
+ * Direct Tunnel: */
+private function f_ranap_rab_ass_req_validate_tli(RANAP_PDU rab_ass_req, PdpActPars apars)
+runs on BSSGP_ConnHdlr {
+ var TransportLayerInformation tli := f_ranap_rab_ass_req_extract_tli(rab_ass_req);
+ var template (present) TransportLayerAddress exp_tla_x213 := decmatch tr_NSAP_Address_IANA_BIN_IPv4(apars.ggsn_ip_u);
+ var template (present) TransportLayerAddress exp_tla_raw := oct2bit(apars.ggsn_ip_u);
+ var template (present) TransportLayerAddress exp_tla;
+ var template (present) TransportLayerInformation exp_tli;
+ if (ispresent(g_pars.ranap_exp_itu_x213_addr_format)) {
+ if (g_pars.ranap_exp_itu_x213_addr_format) {
+ exp_tla := exp_tla_x213;
+ } else {
+ exp_tla := exp_tla_raw;
+ }
+ } else { /* Accept any of the known formats: */
+ exp_tla := (exp_tla_x213, exp_tla_raw);
+ }
+ exp_tli := tr_TLI_ps(exp_tla, apars.ggsn_tei_u);
+ if (not match(tli, exp_tli)) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Rx RAB Ass Req with TLI ", tli, " vs exp ", exp_tli));
+ }
+}
+
altstep as_ranap_rab_ass_req(inout PdpActPars apars) runs on BSSGP_ConnHdlr {
var RANAP_PDU ranap;
[] BSSAP.receive(tr_RANAP_RabAssReq(?)) -> value ranap {
var RAB_ID rab_id := f_ranap_rab_ass_req_extract_rab_id(ranap);
- var TransportLayerInformation tli := f_ranap_rab_ass_req_extract_tli(ranap);
- /* Validate received IP address + TEID from SGSN is the one we
- * did set up from the GGSN, since the SGSN is expected to do
- * Direct Tunnel: */
- var template (present) TransportLayerInformation exp_tli :=
- tr_TLI_ps(oct2bit(enc_NSAP_Address(valueof(ts_NSAP_Address_IANA_BIN_IPv4Len20(apars.ggsn_ip_u)))),
- apars.ggsn_tei_u);
- if (not match(tli, exp_tli)) {
- Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
- log2str("Rx RAB Ass Req with TLI ", tli, " vs exp ", exp_tli));
- }
+ f_ranap_rab_ass_req_validate_tli(ranap, apars);
var template (value) RAB_SetupOrModifiedList l;
var bitstring tla_bits;
diff --git a/sgsn/SGSN_Tests_Iu.ttcn b/sgsn/SGSN_Tests_Iu.ttcn
index 61bd8a9..7a7ee7c 100644
--- a/sgsn/SGSN_Tests_Iu.ttcn
+++ b/sgsn/SGSN_Tests_Iu.ttcn
@@ -19,6 +19,7 @@
import from BSSGP_ConnHdlr all;
+
private function f_init() runs on test_CT {
g_iu_enable := true;
SGSN_Tests.f_init();
@@ -27,6 +28,14 @@
f_vty_config(SGSNVTY, "sgsn", "encryption uea 0");
}
+private function f_vty_iu_rab_assign_addr_enc(boolean use_itu_x213 := true) runs on test_CT {
+ if (use_itu_x213) {
+ f_vty_config(SGSNVTY, "sgsn", "iu rab-assign-addr-enc x213");
+ } else {
+ f_vty_config(SGSNVTY, "sgsn", "iu rab-assign-addr-enc v4raw");
+ }
+}
+
private function f_TC_iu_attach(charstring id) runs on BSSGP_ConnHdlr {
var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip, mp_ranap_cfg[0].sctp_addr.local_ip_addr));
@@ -147,14 +156,37 @@
vc_conn.done;
f_cleanup();
}
-/* Same as TC_attach_pdp_act_user, but encoding HNBGW addr using ITU X.213
-format (IPv4, with padding to reach 20 bytes) in RAB Ass Resp. See OS#6508. */
+
+/* Same as TC_attach_pdp_act_user, but:
+ * - Configure SGSN to send v4raw address in RAB Ass REQ
+ * - Transmit HNBGW addr using v4raw format in RAB Ass Resp.
+ */
+testcase TC_attach_pdp_act_user_addr_v4raw() runs on test_CT {
+ var BSSGP_ConnHdlr vc_conn;
+ var BSSGP_ConnHdlrPars pars;
+ f_init();
+ f_sleep(1.0);
+ f_vty_iu_rab_assign_addr_enc(false); /* Force v4raw */
+ pars := f_new_BSSGP_ConnHdlrPars(1058, f_cell_ids_from_gb(g_gb));
+ pars.ranap_exp_itu_x213_addr_format := false;
+ pars.ranap_use_itu_x213_addr_format := false;
+ vc_conn := f_start_handler_pars(refers(f_TC_attach_pdp_act_user), testcasename(), g_gb, pars);
+ vc_conn.done;
+ f_cleanup();
+}
+/* Same as TC_attach_pdp_act_user, but:
+ * - Configure SGSN to send ITU X.213 address in RAB Ass REQ
+ * - Transmit HNBGW addr using ITU X.213 format (IPv4, with different padding)
+ * in RAB Ass Resp. See OS#6508.
+ */
function f_TC_attach_pdp_act_user_addr_itu_x213_ipv4len(integer imsi_suffix, octetstring padding) runs on test_CT {
var BSSGP_ConnHdlr vc_conn;
var BSSGP_ConnHdlrPars pars;
f_init();
f_sleep(1.0);
+ f_vty_iu_rab_assign_addr_enc(true);
pars := f_new_BSSGP_ConnHdlrPars(imsi_suffix, f_cell_ids_from_gb(g_gb));
+ pars.ranap_exp_itu_x213_addr_format := true;
pars.ranap_use_itu_x213_addr_format := true;
pars.ranap_itu_x213_addr_format_padding := padding;
vc_conn := f_start_handler_pars(refers(f_TC_attach_pdp_act_user), testcasename(), g_gb, pars);
@@ -390,6 +422,7 @@
execute( TC_iu_attach_geran_rau() );
execute( TC_geran_attach_iu_rau() );
execute( TC_attach_pdp_act_user() );
+ execute( TC_attach_pdp_act_user_addr_v4raw() );
execute( TC_attach_pdp_act_user_addr_itu_x213_ipv4len7() );
execute( TC_attach_pdp_act_user_addr_itu_x213_ipv4len20() );
execute( TC_attach_pdp_act_user_addr_itu_x213_ipv4lentoolarge() );
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38452?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I725bf39c5564fb320954fc9e387ac569fc1a0136
Gerrit-Change-Number: 38452
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, laforge, osmith, pespin.
Hello Jenkins Builder, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38434?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+1 by osmith, Verified+1 by Jenkins Builder
Change subject: sgsn: Test tx Rab Ass Resp with ITU X.213 IPv4 address format
......................................................................
sgsn: Test tx Rab Ass Resp with ITU X.213 IPv4 address format
Related: OS#6508
Related: SYS#7119
Change-Id: I38dd85f617600a974cbe8fd17597282eaf950a78
---
M sgsn/BSSGP_ConnHdlr.ttcn
M sgsn/SGSN_Tests.ttcn
M sgsn/SGSN_Tests_Iu.ttcn
M sgsn/expected-results.xml
4 files changed, 55 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/34/38434/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38434?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I38dd85f617600a974cbe8fd17597282eaf950a78
Gerrit-Change-Number: 38434
Gerrit-PatchSet: 4
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: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, laforge.
pespin 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 2:
(1 comment)
Patchset:
PS2:
I now deployed the new version to jenkins.
--
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: 2
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: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 17 Oct 2024 12:34:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria, laforge, pespin.
Hello Jenkins Builder, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ci/+/38432?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: jobs: Move ttcn3-stp-test* to use testenv
......................................................................
jobs: Move ttcn3-stp-test* to use testenv
Depends: osmo-ttcn3-hacks.git e85c0c3069f03068d7187bf971a3e4139f5c4bd0
Change-Id: Ifdee05395c4c80a3c9cb60828c268bcbb8f430a8
---
M jobs/ttcn3-testsuites-testenv.yml
M jobs/ttcn3-testsuites.yml
2 files changed, 20 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/32/38432/2
--
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: newpatchset
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ifdee05395c4c80a3c9cb60828c268bcbb8f430a8
Gerrit-Change-Number: 38432
Gerrit-PatchSet: 2
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: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
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>