Attention is currently required from: laforge, neels, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/36760?usp=email )
Change subject: libmsc: add X5 timer for delaying LU transactions
......................................................................
Patch Set 3:
(2 comments)
Patchset:
PS2:
> But how is the program on the other side of GSUP supposed to know it may want to test sending SMS for that subscriber? do you mind explaining? I think it's good to have it here. There's some sort of event "Location Updated" sent there? (I guess to the HLR in this case?)
"Welcome SMS": keep in mind that it was just a guess from my side. It should be possible to get an LU event notification over the CTRL interface, for instance, but I don't think this is implemented currently.
The customer mentioned in the ticket that they simply want to optimize delivery of MT SMS queued in their SMSC by re-using the existing RR connection. So imagine there is a pending MT SMS for a subscriber, which is "offline" (detached).
The SMSC does not (and is not supposed to) know whether the recipient subscriber is "online" or not, so it would attempt to perform MT SMS delivery first. The MSC would either respond with an error immediately, knowing that the subscriber is explicitly detached, or try to page the subscriber and respond with an error on timeout.
If MT SMS delivery fails due to unavailability of the recipient, the SMSC is supposed to wait for the `readyForSM` notification from the MSC. The MSC is expected to send such a notification when the subscriber is back "online" by performing Location Updating procedure. But not unconditionally!
The VLR/MSC (and HLR too, AFAIR) needs to maintain the `MNRF (MS Not Reachable Flag)` for each subscriber. This flag is set when MT SMS delivery fails, and this flag triggers sending of the `readyForSM` notification. Unfortunately, this is not fully implemented in osmo-msc.
So this is how (in general) the external SMSC entity is supposed to know that it can attempt to deliver a MT SMS again. Regardless of the state of the `MNRF` in osmo-msc, this new X5 timer is still useful since it allows to accomodate for non-zero link delay between the MSC and an SMSC. This timer will play well with the `MNRF`, if we ever will have a chance to implement it properly.
File src/libmsc/msc_a.c:
https://gerrit.osmocom.org/c/osmo-msc/+/36760/comment/202c0f8d_dc40a7b5
PS2, Line 192: osmo_timer_schedule(&msc_a->lu_delay_timer, Tval, 0);
> Yes that's for sure true during the usual operation. […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/36760?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ic519cab55d65e47b2636124427dab1a1d80fab78
Gerrit-Change-Number: 36760
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 16 May 2024 06:09:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/36836?usp=email )
Change subject: ttcn3-docker-run.sh: Fix dumpcap failing to access /data inside docker
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Patchset:
PS2:
not the most elegant solution, but good enough I guess. alternatively we could try to ensure that the UID inside docker is always the same as outside, IIRC this is already the case for a lot of containers (UID gets passed as argument while building docker containers, and gets used in most cases to create the user).
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36836?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: I1229a91cdbb1aa73fd94f1bf7e26f34086f06b25
Gerrit-Change-Number: 36836
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 16 May 2024 06:07:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/36828?usp=email )
Change subject: contrib/systemd: run as osmocom user
......................................................................
contrib/systemd: run as osmocom user
I have verified that with AmbientCapabilities=CAP_SYS_NICE, setting
scheduling policy as described in the manual still works as expected.
Related: OS#4107
Change-Id: I362a9e55309033c42b16f12321f8d1aa27da7b59
---
M contrib/systemd/osmo-pcu.service
A debian/postinst
2 files changed, 55 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/contrib/systemd/osmo-pcu.service b/contrib/systemd/osmo-pcu.service
index 521f6fc..8c0fd69 100644
--- a/contrib/systemd/osmo-pcu.service
+++ b/contrib/systemd/osmo-pcu.service
@@ -9,7 +9,10 @@
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
+User=osmocom
+Group=osmocom
RestartSec=2
+AmbientCapabilities=CAP_SYS_NICE
# CPU scheduling policy:
CPUSchedulingPolicy=rr
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 0000000..cfd72a2
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,39 @@
+#!/bin/sh -e
+case "$1" in
+ configure)
+ # Create the osmocom group and user (if it doesn't exist yet)
+ if ! getent group osmocom >/dev/null; then
+ groupadd --system osmocom
+ fi
+ if ! getent passwd osmocom >/dev/null; then
+ useradd \
+ --system \
+ --gid osmocom \
+ --home-dir /var/lib/osmocom \
+ --shell /sbin/nologin \
+ --comment "Open Source Mobile Communications" \
+ osmocom
+ fi
+
+ # Fix permissions of previous (root-owned) install (OS#4107)
+ if dpkg --compare-versions "$2" le "1.5.0"; then
+ if [ -e /etc/osmocom/osmo-pcu.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-pcu.cfg
+ chmod -v 0660 /etc/osmocom/osmo-pcu.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
+ ;;
+esac
+
+# dh_installdeb(1) will replace this with shell code automatically
+# generated by other debhelper scripts.
+#DEBHELPER#
+
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/36828?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I362a9e55309033c42b16f12321f8d1aa27da7b59
Gerrit-Change-Number: 36828
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(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-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge, osmith, pespin.
Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/36836?usp=email )
Change subject: ttcn3-docker-run.sh: Fix dumpcap failing to access /data inside docker
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Patchset:
PS2:
I guess this is the obvious fix without messing with the id mappings and making everything even more complicated.,
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36836?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: I1229a91cdbb1aa73fd94f1bf7e26f34086f06b25
Gerrit-Change-Number: 36836
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
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-Comment-Date: Wed, 15 May 2024 18:57:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Hoernchen, laforge, osmith.
Hello Hoernchen, Jenkins Builder, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/docker-playground/+/36836?usp=email
to look at the new patch set (#2).
Change subject: ttcn3-docker-run.sh: Fix dumpcap failing to access /data inside docker
......................................................................
ttcn3-docker-run.sh: Fix dumpcap failing to access /data inside docker
In docker, the /data dir is mapped to $VOL_BASE_DIR, which is created by
docker-playground.git jenkins-common.sh, hence as the user running
jenkins.sh in the host system.
As a result, when the dir is mapped to /data, inside the container it
will have the UID:GID of the outter user, not the one inside docker.
Before this patch, if a ttcn3 container was started in jenkins.sh with
--cap-add=NET_ADMIN, then osmo-ttcn3-hacks.git/ttcn3-tcpdump-start.sh
would select dumpcap instead of tcpdump, to attempt to record a pcap
file to /data/$testcase.pcap.
Due to some unknown way of dropping privileges done by dumpcap though,
it was unable to open the /data/$testcase.pcap due to /data being owned
to another user (tcpdump doesn't have this problem).
This patch fixes the above scenario by making sure /data is chowned to
the user running stuff inside docker. This is already kinda expected
since there's a fix_perms() script in jenkins-common.sh reverting files
created during the test so that they can be accessible by outter user
once everything is finished.
Change-Id: I1229a91cdbb1aa73fd94f1bf7e26f34086f06b25
---
M common/ttcn3-docker-run.sh
1 file changed, 32 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/36/36836/2
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36836?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: I1229a91cdbb1aa73fd94f1bf7e26f34086f06b25
Gerrit-Change-Number: 36836
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/36836?usp=email )
Change subject: ttcn3-docker-run.sh: Fix dumpcap failing to access /data inside docker
......................................................................
ttcn3-docker-run.sh: Fix dumpcap failing to access /data inside docker
In docker, the /data dir is mapped to $VOL_BASE_DIR, which is created by
docker-playground.git jenkins-common.sh, hence as the user running
jenkins.sh in the host system.
As a result, when the dir is mapped to /data, inside the container it
will have the UID:GID of the outter user, not the one inside docker.
Before this patch, if a ttcn3 container was started in jenkins.sh with
--cap-add=NET_ADMIN, then osmo-ttcn3-hacks.git/ttcn3-tcpdump-start.sh
would select dumpcap instead of tcpdump, to attempt to record a pcap
file to /data/$testcase.pcap.
Due to some unknown way of dropping privileges done by dumpcap though,
it was unable to open the /data/$testcase.pcap due to /data being owned
to another user (tcpdump doesn't have this problem).
This patch fixes the above scenario by making dure /data is chowned to
the user running stuff inside docker. This is already kinda expected
since there's a fix_perms() script in jenkins-common.sh reverting files
created during the test so that they can be accessible by outter user
once everything is finished.
Change-Id: I1229a91cdbb1aa73fd94f1bf7e26f34086f06b25
---
M common/ttcn3-docker-run.sh
1 file changed, 32 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/36/36836/1
diff --git a/common/ttcn3-docker-run.sh b/common/ttcn3-docker-run.sh
index c8c871e..60339c4 100755
--- a/common/ttcn3-docker-run.sh
+++ b/common/ttcn3-docker-run.sh
@@ -31,6 +31,9 @@
done
fi
+# Make sure /data is owned to the user running inside docker.
+# jenkins-commons.sh fix_perms() will fix back the permissions once done.
+chown -R "$(id -u):$(id -g)" /data
cd /data
# Use TEST_NAME to only run one test instead of all. Set it like this:
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36836?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: I1229a91cdbb1aa73fd94f1bf7e26f34086f06b25
Gerrit-Change-Number: 36836
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange