osmith has uploaded this change for review.

View Change

repo-install-test: run without SYS_NICE

At least on my system, --cap-add SYS_NICE doesn't work as expected with
podman 3.4.4 (maybe it doesn't work in combination with
--systemd=always?). Remove it and just comment out the CPUScheduling
lines in the systemd services.

Related: OS#5365
Change-Id: I00d0349c236c8619a3ab9cf22238cba73af1e45c
---
M scripts/repo-install-test.sh
M scripts/repo-install-test/run-inside-podman.sh
2 files changed, 6 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/69/30469/1
diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index 3891ebd..0ee0bec 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -97,7 +97,6 @@
# Run the container
# * This does not output anything, for debugging add -it and remove &.
# * SYS_ADMIN: needed for osmo-pcap-client
-# * SYS_NICE: needed for changing CPUScheduling{Policy,Priority} (osmo-bts systemd service files)
podman run --rm \
-v "$OSMO_CI_DIR/scripts/repo-install-test:/repo-install-test:ro" \
--name "$CONTAINER" \
@@ -109,7 +108,6 @@
-e container=podman \
--cap-add SYS_ADMIN \
--systemd=always \
- --cap-add SYS_NICE \
$args \
"$IMAGE" \
/lib/systemd/systemd &
diff --git a/scripts/repo-install-test/run-inside-podman.sh b/scripts/repo-install-test/run-inside-podman.sh
index 4426932..19cb3db 100755
--- a/scripts/repo-install-test/run-inside-podman.sh
+++ b/scripts/repo-install-test/run-inside-podman.sh
@@ -380,6 +380,12 @@
services_feed="$services_feed $SERVICES_NIGHTLY"
fi

+ # Disable CPUScheduling in systemd services, doesn't work inside podman
+ for i in $(grep -rl "^CPUScheduling" /lib/systemd/system); do
+ sed -i 's/^CPUScheduling/# CPUScheduling/g' "$i"
+ done
+ systemctl daemon-reload
+
systemctl start $services_feed
sleep 2


To view, visit change 30469. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I00d0349c236c8619a3ab9cf22238cba73af1e45c
Gerrit-Change-Number: 30469
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-MessageType: newchange