Commit Graph

1093 Commits

Author SHA1 Message Date
Oliver Smith 359f1e7b2b debian-bullseye-build: add libmnl-dev
As required by libosmocore, e.g. when building programs directly in this
container with osmo-dev.git/ttcn3/ttcn3.sh.

Change-Id: I4cd05ef2c164dfb765ee365ab38b8dfd4f955ac6
2022-05-04 09:10:49 +00:00
Oliver Smith cd97dbd78b ttcn3-bsc-test: set osmo-bts-omldummy features
Add arguments to osmo-bts-omldummy to properly report the features that
were previously assumed for osmo-bts even without reporting them, until
this was changed in osmo-bsc I7fca42a39a4bc98a6ea8b9cfab28c4bad3a6a0aa.

Related: SYS#5922, OS#5538
Change-Id: Ib22f25431330676d59900de7bfb3d89e7872baf1
2022-05-03 15:10:55 +02:00
Pau Espin 6e1a4e7df0 ttcn3-ggsn-test-ogs: set CAP_NET_RAW for open5gs-upfd
The SO_BINDTODEVICE feature (used for VRF) requires CAP_NET_RAW. Since
we run open5gs-upfd as user "osmocom", that seems to be causing some
permission problems under some systems (like jenkins). Let's make sure
we add the capabilitites to the binary before launching it as user
"osmocom".

Change-Id: I51ee6954a6c019a41cfcd50b2d99166316989d9b
2022-05-02 11:36:18 +02:00
Harald Welte 03d9974db8 debian-buster-jenkins: install libelf-dev
Add libelf-dev to be able to build kernel modules with
defconfig_x86_64.

This is an update to commit d6c5c7a034,
which should have not just modified the stretch but also the buster
Docker image

Change-Id: I4c442d86688278ff634a286b98637189eef88bfb
Related: OS#5407
2022-04-24 18:15:03 +02:00
Pau Espin af1397c5ea ttcn3-pgw: Configure Gy interface
Depends: osmo-ttcn3-hacks.git Ie4e567f62bbbdba276e6b3221111c8d9f82cde14
Change-Id: Iaeed2086aa058e1079295cb1911ad80e9613f8fa
2022-04-21 17:29:32 +02:00
Vadim Yanitskiy 94b49e136d ttcn3-bsc-test/osmo-bsc.cfg: set AMR link adaptation params
Change-Id: Idf5b22c7d50d283d24edf5ccd8de9051f7c2642f
Related: osmo-bsc.git Ic5f8d55d250976d8d4c9cae2d89480fd52326717
Related: SYS#5917
2022-04-16 22:00:49 +03:00
Vadim Yanitskiy 83c6938888 Revert "osmo-bsc-{master,latest}/osmo-bsc.cfg: set AMR link adaptation params"
This reverts commit 029c8df999.

I actually meant to change osmo-bsc.cfg in ttcn3-bsc-test.

Change-Id: I85c577cbc608a77d6d6a5816f1fb7205361f7b4a
Related: SYS#5917
2022-04-16 21:42:02 +03:00
Vadim Yanitskiy 029c8df999 osmo-bsc-{master,latest}/osmo-bsc.cfg: set AMR link adaptation params
The default AMR link adaptation parameters have been changed in
the recent osmo-bsc, so set the old expected default explicitly.

Change-Id: Ic1c46d54ef97278100bd52156ad5627418ef5c97
Related: osmo-bsc.git Ic5f8d55d250976d8d4c9cae2d89480fd52326717
Related: SYS#5917
2022-04-14 22:53:23 +03:00
Vadim Yanitskiy 52d594e1a4 open5gs-latest: fix Dockerfile: avoid using curl for downloading keys
Since recently, curl fails to download the key from www.mongodb.org:

'''
$ curl --verbose https://www.mongodb.org/static/pgp/server-4.2.asc
GET /static/pgp/server-4.2.asc HTTP/1.1
Host: www.mongodb.org
User-Agent: curl/7.82.0
Accept: */*

Mark bundle as not supporting multiuse
HTTP/1.1 301 Moved Permanently
Content-Type: text/html
Date: Wed, 13 Apr 2022 20:50:19 GMT
Location: https://pgp.mongodb.com/server-4.2.asc
Connection: Keep-Alive
Content-Length: 0
'''

By default, curl would not follow redirects unless '-L' is specified.
Let's use Docker's 'ADD' command instead, like many Dockerfiles do.
Also, update the address as suggested in the server's response.

Change-Id: I9757fcce084595341b1a68822bad454b64941eb1
Related: SYS#5602
2022-04-13 23:55:24 +03:00
Pau Espin e9146766b5 ttcn-pgw-test: Improve osmo-uecups cfg file
Bind to specific container IP address.
Use more uniform logging config settings as most of the other osmocom processes.

Change-Id: I36bb04a388ab65aaa03a82c159a1b258886ec0d0
2022-04-12 13:41:44 +02:00
Pau Espin a9b4a891a0 ttcn-ggsn: Configure open5gs-smfd to connect to TTCN3 OCS
Change-Id: I5a7ace64cefead2c05437ea75ba29ecc969d426e
2022-04-12 13:12:37 +02:00
Pau Espin 1026069a42 make: Allow passing OSMO_UECUPS_BRANCH
Change-Id: I6060364843b1a3e3547a45d98a1248ead22f3970
2022-04-12 11:55:52 +02:00
Pau Espin 043f436fcb ttcn3-pgw: Parallel docker container stop
Stopping all the containers takes quite a lot of time. Let's stop them
all in parallel to gain some time.

Change-Id: Iabf63ebdee9d1bf13a364ea3eb530ed9dae9b2a5
2022-04-11 13:31:04 +02:00
Pau Espin e9a25e2b25 ttcn3-pgw: Pass config file to osmo-uecups
Change-Id: I714172ca063c76a3104daf06f52b5823f304dffe
2022-04-11 13:21:21 +02:00
Pau Espin 713468b295 ttcn3-{ggsn,pgw}-test: Avoid open5gs itself logging to a file
We already log stdout/stderr to a file, so there's no need to log a file
internally. We prefer logging that through stdout/stderr in order to
catch more stuff, like segfaults.

Change-Id: Ifdc010f26abdc8cefeec0c72a1f617911ec375d7
2022-04-07 20:40:12 +02:00
Pau Espin 9a744f2108 ttcn3-pgw-test: Log open5gs-nrfd stdout/stderr
This way we see potential crashes.

Change-Id: I31f2ff2dd5daa68756e910c4cb91acefdad50cb1
2022-04-07 20:38:31 +02:00
Pau Espin 5c9182751c ttcn3-pgw-tests: use same bootstrap for upfd as in ttcn-ggsn-tests-ogs
This approach has several benefits:
* We end up with ip/tun setup output in the same log file as
  open5gs-upfd process output.
* We configure all ip/tun *before* the open5gs-upfd process starts.

Furthermore, we have same procedure as in ttcn3-ggsn-tests-ogs, which
simplifies maintainment/use.

The IP address pool for UEs is still different in pgw-tests and
ggsn-tests-ogs. We can make them the same in subsequent patches.

Change-Id: I94219abbeb5e004ce707407b5aa5ee8ad6c3a80e
2022-04-07 20:24:18 +02:00
Pau Espin 6acec0cbd1 ttcn3-{pgw,ggsn}-tests: Add comment with procedure to get open5gs-smfd bt automatically
Some specific gdb commands need to be run in open5gs-smfd to get the
desired result (some signals need to be ignored).
gdb use is not enabled by default. Furthermore, if one wants to use it,
editing the Dockerfile to install gdb is required.

Change-Id: I1ac8b77e84d57040fc09964356bc8a01e5d721e3
2022-04-07 19:48:51 +02:00
Pau Espin ca3b751ae0 ttcn3-pgw-test: Use process name in log file
This way it becomes similar to what we use in ttcn3-ggsn-tests-ogs.

Change-Id: Ibac0e6bc9dc7c2e576a4f5d1ccb730211d1e1427
2022-04-07 19:42:11 +02:00
Pau Espin 8063cd7da1 ttcn3-pgw-test: Log stdout to find crashes
Change-Id: I573637866787ce1f613bd56a009251578c98cbf3
2022-04-07 19:40:33 +02:00
Pau Espin cc7f9b4896 ttcn3-ggsn-ogs: Rename config files
Let's make names similar to what's used in PGW_Tests. Also, in
open5gs.git, config files don't contain the "d" at the end.

Change-Id: If56d1a890a4f1b80b4f04ae22644f9cb9cdd35f4
2022-04-07 19:36:56 +02:00
Vadim Yanitskiy 6ab6e52249 gr-gsm-master: migrate from archlinux to debian-bullseye-build
Arch Linux ships gnuradio-3.9.4.0, while gr-gsm has not been migrated
to 3.9 yet.  Let's use debian:bullseye, which ships gnuradio-3.8.2.0.

Change-Id: I9900addf152fd254283ef340cea16583ee5ac1c5
2022-03-26 00:08:56 +03:00
Pau Espin 913930f570 ttcn3-ggsn-ogs: Use new bind_dev config option for GTP sockets
This way we validate the feature is run and open5gs-smfd/upfd don't fail
when applying it.

Related: SYS#5846
Change-Id: Ie23db8ffb4868e4bc75783e2f6eb7a725b376ea7
2022-03-15 14:40:30 +01:00
Pau Espin 2f3aff2a23 ttcn3-ggsn-ogs: Change diameter node id to pcrf
This better identifies the peer, specially since we'll also connect to
an OCS in the future.

Depends: osmo-ttcn3-hacks.git Change- Id I1eb03d907b46c4bb24491f390ef468e831190e08
Change-Id: I4c9f90de1456cf1515c9a0608b44a44fa8acb311
2022-03-08 13:56:03 +01:00
Vadim Yanitskiy 63531ac474 centos8-repo-install-test: set UPSTREAM_DISTRO=almalinux:8 in Makefile
Otherwise 'debian:bullseye' is used by default when running make.

Change-Id: I1744f5199b1686ee615173572afee524104eb91f
2022-03-04 03:34:04 +07:00
Oliver Smith 2ce4f7593b debian-*-jenkins: git clone from gerrit
Avoid occasional clone failures by replacing https://git.osmocom.org
with https://gerrit.osmocom.org.

  Step 18/28 : RUN git clone https://git.osmocom.org/osmo-ci osmo-ci && 	cp -v $(find osmo-ci/scripts 		-maxdepth 1 		-type f ) 	   /usr/local/bin
   ---> Running in c1c0bc9fb861
  Cloning into 'osmo-ci'...
  error:  (curl_result = 56, http_code = 200, sha1 = ded2f31cbac2e7b0ae6c3c4147f4e21ab1ce9b98)
  error: Unable to find ded2f31cbac2e7b0ae6c3c4147f4e21ab1ce9b98 under https://git.osmocom.org/osmo-ci
  Cannot obtain needed tree ded2f31cbac2e7b0ae6c3c4147f4e21ab1ce9b98
  while processing commit bff275075548c443596aa1eb80d784e4cd3c2231.
  error: fetch failed.

Related: SYS#5857
Change-Id: I9ad8e5755c5d520ff33d85792a5a70da62d05253
2022-03-01 11:54:19 +00:00
Pau Espin 254464d830 ttcn3-ggsn: Modify configs to alloc bigger IPv4 pools
This is needed for test TC_lots_of_concurrent_pdp_ctx, which creates up
to 1000 pdp contexts.

Change-Id: If3344c8acc9bc3b43ed0a13af52807d2a6050a81
2022-02-25 17:59:22 +01:00
Oliver Smith 5e0efb16e8 ttcn3-fr-test/jenkins.sh: make use of clean_up()
Move cleaning up logic to clean_up(), so it runs as part of the
clean_up_trap if any command in the previous code fails.

For example, if the first docker container started properly, but the
second docker container failed to start: without this patch, it would
just stop the script without running the clean up code.

Change-Id: I4624e37d5d2fa90b71b32d72067b3645f69805da
2022-02-22 12:06:38 +01:00
Oliver Smith 0f63ef4b6d ttcn3-fr-test/jenkins.sh: revert docker run --rm
Revert the change of adding a --rm to the "docker run" commands done in
I48b01c43fedf379b8a565eaab0369806d7831bd8.

This script runs the containers in the background, waits until they are
done, copies the logs and then removes them afterwards.

Fix for:
  + docker kill jenkins-ttcn3-fr-test-384-frnet
  jenkins-ttcn3-fr-test-384-frnet
  + docker logs --timestamps jenkins-ttcn3-fr-test-384-ttcn3-fr-test
  Error: No such container: jenkins-ttcn3-fr-test-384-ttcn3-fr-test

Change-Id: I56dc07820ccfa8ad6936764262a7c6c272e59c37
2022-02-22 12:00:12 +01:00
Pau Espin 107e1b9bca ttcn3-ggsn-test-ogs: Run all tests
Change-Id: If400fe325d3fc9a0df168d41b3a1fe68c0e37d2f
2022-02-21 10:36:26 +00:00
Daniel Willmann f8847e202a Add ttcn3-hnbgw-test docker container
Only works in OSMO_HNBGW_BRANCH=pmaier/mgw2 for now

Change-Id: I7e06c1d4365a34b8b6b02a4748714694dfa14554
2022-02-17 19:31:10 +01:00
Daniel Willmann 461a858c0a osmo-hnbgw-master: Fix build dependencies
Change-Id: I44c7bb81138b0a10519e59440a20fc7a43e3e480
2022-02-17 19:31:07 +01:00
Pau Espin 79a08990b4 Remove debian-buster-erlang
We don't need the image anymore, we use debian-bullseye-erlang.

Change-Id: I6f22642f5f67a173b17db55aa7a7bda3d9debd54
2022-02-16 19:28:53 +00:00
Pau Espin 987c12442d debian-bullseye-erlang: Build rebar3 from source
This way we ensure it is always built against the same erlang OTP
installed in the system.

Change-Id: I6cd8a61ca52c7beda98b357f82ce42eba54e196b
2022-02-16 17:42:03 +00:00
Pau Espin e4f5dc89a4 Add debian-bullseye-erlang docker image
Copied from debian-buster-erlang, references to debian 10 and buster
modified to debian11 and bullseye.

Change-Id: I5c13eedcbfa721b7e1939e571470ea7044c00211
2022-02-16 15:50:32 +01:00
Oliver Smith 5c158b326a treewide: fix missing --rm for "docker run"
Add "--rm" to each "docker run" command, so they don't continuously fill
up disk space.

Fix this even in the pipework script. We don't use the code path there,
but by always having --rm after "docker run" (same line or next line),
a new lint script in osmo-ci I8ab9c291504475d670bdefc50c4524c5bdd4c880
can help us avoid this in the future.

In ttcn3-ggsn-test/jenkins.sh, move one existing --rm in a later line
upwards so the linter can find it.

Related: SYS#5827, OS#5099
Related: https://github.com/jpetazzo/pipework/pull/248
Change-Id: I48b01c43fedf379b8a565eaab0369806d7831bd8
2022-02-14 08:56:27 +01:00
Oliver Smith 266cb2165c common/pipework: deduplicate
Move the pipework script from several image directories to the common
dir.

Change-Id: I88ff40ca69c9ee76bef9bb8f24f66ca9d5ac751a
2022-02-14 07:46:23 +00:00
Oliver Smith a0a991f412 make/Makefile: always use docker run --rm
Add --rm to the "docker run" line in make/Makefile, and remove it from
RUN_ARGS.

Related: https://osmocom.org/projects/osmocom-servers/wiki/Docker_cache_clean_up
Related: SYS#5827
Change-Id: Iea063aa39a08397ea64d2018b433991a130e7f56
2022-02-14 07:46:23 +00:00
Pau Espin 45a2b5d817 ttcn3-ggsn-tests-ogs: Configuration fixes for IPv6 tests
Change-Id: I6fe98f6642bbd42376c9ed7353b58451c104eaca
2022-02-11 18:39:23 +00:00
Pau Espin 5095686e02 ttcn3-ggsn-tests-ogs: Set correct DNS address to get ping working
The DNS address provided is used by the test to ping. In osmo-ggsn, we
configured the DNS to be the shared address between GTPC and GTPU. In
open5gs, the addresses are different. Hence, let's pass the GTPU address
instead of the GTPC address to make the setup easier (no need to have
proper routing working between UPFD and SMFD containers).

Change-Id: I2a452ad871612d1c88b94579dadbe62b718b1475
2022-02-11 18:39:23 +00:00
Vadim Yanitskiy 44393058f6 make/Makefile: allow overriding '-it' for target 'run'
Allocating a pseudo-TTY (-t, --tty) fails when 'run' is executed
inside of a Jenkins or cron script.  This change fixes
ttcn3-bts-test, which invokes 'run' to fetch the config files.

Change-Id: If22f682be4f004c5bb43e65098079a4f4fe6158d
Fixes: If15461240f3037c142c176fc7da745a1701ae3f8
2022-02-11 15:21:16 +06:00
Harald Welte 8e3b3ff43c ttcn3-bts-test: use osmo-config-merge to generate config files
This uses the config files from osmo-ttcn3-hacks.git instead of keeping
local copies around here, which has shown many times will get out of
sync.  Extract the original files (*.src.cfg) from the testsuite image
(ttcn3-bts-test) and merge them with the local *.confmerge files using
osmo-config-merge.  Use the resulting files (*.gen.cfg).

Unfortunately, osmo-config-merge is not capable of removing text blocks
or substituting specific parts, so we fall-back to using sed where it's
needed.  A good example is 'log gsmtap 127.0.0.1', as there is no
command for removing a logging target of such type.

Co-Authored-By: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
Co-Authored-By: Oliver Smith <osmith@sysmocom.de>
Change-Id: If15461240f3037c142c176fc7da745a1701ae3f8
2022-02-10 22:49:24 +06:00
Vadim Yanitskiy edaa9d3033 ttcn3-bts-test: move generic config files into a directory
Change-Id: I1bc5c51306525c6829e9d8e2991555a99c9b49a2
2022-02-10 19:08:37 +06:00
Pau Espin 500f14e9db ttcn3-ggsn-test-ogs: Configure correct GTP-U GGSN address
Change-Id: Id42b591ba03f451e89b0e332edcf8f2cded9f444
2022-02-08 16:41:59 +00:00
Vadim Yanitskiy 31b54054f7 make/Makefile: generalize passing additional build arguments
Building of some images may require additional options to be passed.

Change-Id: Id1761062ac6ec1d1a4eb6a6b724e42cf576c848f
2022-02-07 17:19:36 +00:00
Vadim Yanitskiy 4403dbb0a5 open5gs-master: ensure consistent install paths with '-latest'
This allows running TTCN-3 test cases against both '-latest' and
'-master' images using the same configuration files.

Change-Id: Ib4dcf3a9f77205dcdd0ff4932763e202cb89001c
Related: SYS#5602
2022-02-07 16:37:21 +06:00
Vadim Yanitskiy e8c1360b92 open5gs-master: install dependencies using apt-get build-dep
This is a 3-rd party project, which may introduce new dependencies
in the future.  Rather than maintaining our own list of packages
to install, let's employ 'apt-get build-dep'.  This tool parses
'debian/control' and installs all dependencies automatically.

Change-Id: I71ad7256116ee30f15aff38fd38588aa2bfab456
Related: SYS#5602
2022-02-07 16:30:20 +06:00
Vadim Yanitskiy f532d78922 fixup: debian-bullseye-titan: run 8 parallel jobs for 'make deps'
Change-Id: I8fe9ff0b7c27ae7c71bd9bac6048b3073adf6bda
2022-02-07 09:37:41 +00:00
Pau Espin 80ac90261b Add ttcn3-ggsn-ogs testsuite
This new setup allows running TTCN3 GGSN_Tests against open5gs, which
will soon gain GTPv1C support.

Change-Id: Ia6c122fce951d369a5d2362cbe99d10d61c15f49
2022-02-07 08:47:33 +00:00
Vadim Yanitskiy c0e6589279 open5gs-master: migrate to debian-bullseye-build
It's a common practice to have a shared '-build' image and base
the '-master' images on top of it to avoid installing same
dependencies across different images.

Finally we can use more recent meson from debian's repositories,
so no need to depend on python and install it using pip.

Change-Id: I93422916b232f686dc27a2ff452e20e73db50f58
Related: SYS#5602
2022-02-04 13:33:40 +00:00