lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

December 2022

  • 1 participants
  • 1979 discussions
Change in osmo-ci[master]: repo-install-test: add SKIP_PREPARE_VM env var
by osmith 09 Dec '22

09 Dec '22
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30506 ) Change subject: repo-install-test: add SKIP_PREPARE_VM env var ...................................................................... repo-install-test: add SKIP_PREPARE_VM env var Change-Id: I96c7aef70d9d2c6318ce4e43c24450461bc00d91 --- M scripts/repo-install-test.sh M scripts/repo-install-test/run-inside.sh 2 files changed, 9 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh index 300357c..38f1a6b 100755 --- a/scripts/repo-install-test.sh +++ b/scripts/repo-install-test.sh @@ -5,6 +5,7 @@ # * KEEP_VM: for development: don't kill/start VM if still running # * PROJ: OBS project namespace (e.g. "osmocom:latest") # * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly") +# * SKIP_PREPARE_VM: for development, skip the prepare_vm code # * TESTS: which tests to run (all by default, see below for possible values) . "$(dirname "$0")/common.sh" @@ -138,6 +139,7 @@ export FEED="$FEED" export PROJ="$PROJ" export PROJ_CONFLICT="$PROJ_CONFLICT" + export SKIP_PREPARE_VM="$SKIP_PREPARE_VM" export TESTS="$TESTS" /repo-install-test/run-inside.sh diff --git a/scripts/repo-install-test/run-inside.sh b/scripts/repo-install-test/run-inside.sh index 5f01524..5e6a852 100755 --- a/scripts/repo-install-test/run-inside.sh +++ b/scripts/repo-install-test/run-inside.sh @@ -5,6 +5,7 @@ # * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development) # * PROJ: OBS project namespace (e.g. "osmocom:latest") # * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly") +# * SKIP_PREPARE_VM: for development, skip the prepare_vm code # * TESTS: which tests to run (see repo-install-test.sh) # Systemd services that must start up successfully after installing all packages (OS#3369) @@ -189,6 +190,10 @@ } prepare_vm() { + if [ -n "$SKIP_PREPARE_VM" ]; then + return + fi + case "$DISTRO" in debian*) prepare_vm_debian @@ -197,6 +202,8 @@ prepare_vm_centos ;; esac + + configure_osmocom_repo "$PROJ" } # $1: file @@ -416,7 +423,6 @@ check_env prepare_vm -configure_osmocom_repo "$PROJ" for test in $TESTS; do set +x -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30506 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I96c7aef70d9d2c6318ce4e43c24450461bc00d91 Gerrit-Change-Number: 30506 Gerrit-PatchSet: 2 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-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: repo-install-test: fix check for Release.key
by osmith 09 Dec '22

09 Dec '22
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30507 ) Change subject: repo-install-test: fix check for Release.key ...................................................................... repo-install-test: fix check for Release.key $release_key is not defined, replace it with the path. Change-Id: I6bd13cc6149db1f2ba25ef1ee343115d3c53cf3b --- M scripts/repo-install-test/run-inside.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/scripts/repo-install-test/run-inside.sh b/scripts/repo-install-test/run-inside.sh index 5e6a852..da49f7d 100755 --- a/scripts/repo-install-test/run-inside.sh +++ b/scripts/repo-install-test/run-inside.sh @@ -105,7 +105,7 @@ echo "Configuring Osmocom repository" # Add repository key - if ! [ -e "$release_key" ]; then + if ! [ -e /tmp/Release.key ]; then wget -O /tmp/Release.key "https://obs.osmocom.org/projects/$proj/public_key" fi -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30507 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6bd13cc6149db1f2ba25ef1ee343115d3c53cf3b Gerrit-Change-Number: 30507 Gerrit-PatchSet: 2 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-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: Cosmetic: repo-install-test: sort env vars comment
by osmith 09 Dec '22

09 Dec '22
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30504 ) Change subject: Cosmetic: repo-install-test: sort env vars comment ...................................................................... Cosmetic: repo-install-test: sort env vars comment Related: OS#5365 Change-Id: Ic21b46e614c7bfd8e0306599b4d33a1b963db376 --- M scripts/repo-install-test.sh M scripts/repo-install-test/run-inside-docker.sh 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh index 2a3e739..f2fbdc8 100755 --- a/scripts/repo-install-test.sh +++ b/scripts/repo-install-test.sh @@ -1,10 +1,10 @@ #!/bin/sh -ex # Environment variables: -# * INTERACTIVE: set to 1 to keep an interactive shell open after the script ran (for debugging) # * FEED: binary package feed (e.g. "latest", "nightly") +# * INTERACTIVE: set to 1 to keep an interactive shell open after the script ran (for debugging) +# * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development) # * PROJ: OBS project namespace (e.g. "osmocom:latest") # * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly") -# * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development) # * TESTS: which tests to run (all by default, see below for possible values) . "$(dirname "$0")/common.sh" diff --git a/scripts/repo-install-test/run-inside-docker.sh b/scripts/repo-install-test/run-inside-docker.sh index f95bae0..ce71bb8 100755 --- a/scripts/repo-install-test/run-inside-docker.sh +++ b/scripts/repo-install-test/run-inside-docker.sh @@ -1,10 +1,10 @@ #!/bin/sh -ex # Environment variables: +# * DISTRO: linux distribution name (e.g. "centos8") # * FEED: binary package feed (e.g. "latest", "nightly") +# * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development) # * PROJ: OBS project namespace (e.g. "osmocom:latest") # * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly") -# * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development) -# * DISTRO: linux distribution name (e.g. "centos8") # * TESTS: which tests to run (see repo-install-test.sh) # Systemd services that must start up successfully after installing all packages (OS#3369) -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30504 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ic21b46e614c7bfd8e0306599b4d33a1b963db376 Gerrit-Change-Number: 30504 Gerrit-PatchSet: 2 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-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: ansible: add rules to install qemu images
by osmith 09 Dec '22

09 Dec '22
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30503 ) Change subject: ansible: add rules to install qemu images ...................................................................... ansible: add rules to install qemu images Prepare to run repo-install-test inside qemu with kvm instead of docker, see following patches. Related: OS#5365 Change-Id: Ia7626fcd397d32e1180e320d4a76a65bcad01b7b --- M ansible/hosts A ansible/roles/qemu/files/qemu-create-vms.sh A ansible/roles/qemu/tasks/main.yml M ansible/setup-jenkins-slave.yml 4 files changed, 110 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/ansible/hosts b/ansible/hosts index 5ff2ab6..a60d6d6 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -23,3 +23,7 @@ [obs-workers] build3-obsworker1 ansible_host=2a01:4f8:212:3762::1:2 obs_worker_instances=8 obs_worker_jobs=8 lx2-1-obs-aarch64-1 ansible_host=2a02:8106:13:1e34:4e9:e7ff:fe97:fe92 obs_worker_instances=1 obs_worker_jobs=4 + +# Need to have kvm inside lxc, see OS#5365 +[qemu] +build3-deb11build-ansible ansible_host=2a01:4f8:212:3762::1:3 diff --git a/ansible/roles/qemu/files/qemu-create-vms.sh b/ansible/roles/qemu/files/qemu-create-vms.sh new file mode 100755 index 0000000..8cceba8 --- /dev/null +++ b/ansible/roles/qemu/files/qemu-create-vms.sh @@ -0,0 +1,75 @@ +#!/bin/sh -e +# Create qcow2 images with ssh root login enabled for repo-install-test and +# store them in /opt/qemu. +# Set KEEP_CACHE=1 during development, so virt-builder only needs to download +# the image once. + +# Distribution names, as in the base images from here: +# https://builder.libguestfs.org/ +DISTROS=" + alma-8.5 + debian-10 + debian-11 +" +TEMP_SCRIPT="$(mktemp)" + +if [ "$(id -u)" != 0 ]; then + echo "ERROR: run this as root" + exit 1 +fi + +mkdir -p /opt/qemu + +for distro in $DISTROS; do + img="/opt/qemu/$distro.qcow2" + + echo + echo "# $distro" + echo + + if [ -e "$img" ]; then + echo "=> File exists, skipping." + continue + fi + + case "$distro" in + alma-*) + # Install SCTP kernel module + # https://forums.centos.org/viewtopic.php?t=71818 + cat <<- EOF > "$TEMP_SCRIPT" + #!/bin/sh -ex + dnf upgrade -y kernel + dnf install -y kernel-modules-extra + rm -f /etc/modprobe.d/sctp-blacklist.conf + EOF + ;; + debian-*) + # Generate SSH server keys and allow login as root + cat <<- EOF > "$TEMP_SCRIPT" + #!/bin/sh -ex + ssh-keygen -A + echo "PermitRootLogin yes" >> /etc/ssh/sshd_config + EOF + ;; + esac + + virt-builder \ + "$distro" \ + -o "/opt/qemu/$distro.qcow2" \ + --format qcow2 \ + --root-password password:root \ + --run "$TEMP_SCRIPT" \ + --verbose + + if [ -z "$KEEP_CACHE" ]; then + virt-builder --delete-cache + fi +done + +rm "$TEMP_SCRIPT" + +# Marker for ansible main.yml to skipt the script +touch /opt/qemu/.qemu-create-vms-done-v1 + +echo +echo "Done!" diff --git a/ansible/roles/qemu/tasks/main.yml b/ansible/roles/qemu/tasks/main.yml new file mode 100644 index 0000000..c296f8f --- /dev/null +++ b/ansible/roles/qemu/tasks/main.yml @@ -0,0 +1,22 @@ +--- + +- name: install packages + apt: + name: + - libguestfs-tools + - netcat + - qemu-system-x86 + - sshpass + cache_valid_time: 3600 + update_cache: yes + +- name: run qemu-create-vms.sh + ansible.builtin.script: qemu-create-vms.sh + args: + creates: /opt/qemu/.qemu-create-vms-done-v1 + +- name: add jenkins to the kvm group + user: + name: "{{ jenkins_user }}" + groups: kvm + append: yes diff --git a/ansible/setup-jenkins-slave.yml b/ansible/setup-jenkins-slave.yml index 05e3bde..7eac8b7 100644 --- a/ansible/setup-jenkins-slave.yml +++ b/ansible/setup-jenkins-slave.yml @@ -53,3 +53,12 @@ - name: install-coverity tags: - coverity + +- name: setup qemu images + hosts: qemu + user: root + roles: + - name: qemu + jenkins_user: osmocom-build + tags: + - qemu -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30503 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ia7626fcd397d32e1180e320d4a76a65bcad01b7b Gerrit-Change-Number: 30503 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: repo-install-test: run inside qemu + kvm
by osmith 09 Dec '22

09 Dec '22
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30505 ) Change subject: repo-install-test: run inside qemu + kvm ...................................................................... repo-install-test: run inside qemu + kvm Change repo-install-test to run inside of qemu instead of docker. This job needs to run systemd to verify that the systemd services start up properly. Running systemd inside docker was never officially supported, it worked with cgroups1 but does not work anymore with cgroups2. An alternative approach was running inside podman instead of docker (running systemd inside of podman is officially supported). However we would have needed various workarounds with podman and wouldn't be able to test all Osmocom systemd services in the end, due to lack of permissions (see review of I394918fc61de36acce65ffb33defcb8fc21801c4). By running with a separate kernel inside qemu we can run all Osmocom services. Related: OS#5365 Change-Id: Ie7f1bccb05779cb3614016c0b965b810bbb1471b --- M .gitignore M scripts/repo-install-test.sh R scripts/repo-install-test/run-inside.sh 3 files changed, 235 insertions(+), 86 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 1009a64..fa28062 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,4 @@ _release_tarballs/ _docker_playground _repo_install_test_data/ -_repo_install_test_cache/ +scripts/repo-install-test/run-inside-env.sh diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh index f2fbdc8..300357c 100755 --- a/scripts/repo-install-test.sh +++ b/scripts/repo-install-test.sh @@ -2,7 +2,7 @@ # Environment variables: # * FEED: binary package feed (e.g. "latest", "nightly") # * INTERACTIVE: set to 1 to keep an interactive shell open after the script ran (for debugging) -# * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development) +# * KEEP_VM: for development: don't kill/start VM if still running # * PROJ: OBS project namespace (e.g. "osmocom:latest") # * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly") # * TESTS: which tests to run (all by default, see below for possible values) @@ -14,6 +14,12 @@ debian10 debian11 " +IMG_DIR="/opt/qemu" +TEST_DIR="scripts/repo-install-test" +IMG_PATH="_repo_install_test_data/temp.qcow2" +PID_FILE="_repo_install_test_data/qemu.pid" +PORT_FILE="_repo_install_test_data/qemu.port" +LOG_FILE="_repo_install_test_data/qemu.log" check_usage() { local i @@ -22,17 +28,198 @@ return fi done + set +x + echo echo "usage: repo-install-test.sh DISTRO" echo "DISTRO: one of: $DISTROS" exit 1 } +get_backing_img_path() { + local ret="" + + case "$DISTRO" in + centos8) + ret="$IMG_DIR/alma-8.5.qcow2" + ;; + debian10) + ret="$IMG_DIR/debian-10.qcow2" + ;; + debian11) + ret="$IMG_DIR/debian-11.qcow2" + ;; + *) + set +x + echo "ERROR: script error, missing img path for $DISTRO" >&2 + exit 1 + ;; + esac + + if [ -e "$ret" ]; then + echo "$ret" + else + set +x + echo "ERROR: file not found: $ret" >&2 + echo "ERROR: qemu images not installed via ansible?" >&2 + exit 1 + fi +} + +find_free_ssh_port() { + SSH_PORT="$(echo "($PPID % 1000) + 22022" | bc)" + while nc -z 127.0.0.1 "$SSH_PORT"; do + SSH_PORT=$((SSH_PORT + 1)) + done + + echo "$SSH_PORT" > "$PORT_FILE" +} + +prepare_img() { + mkdir -p "$(dirname "$IMG_PATH")" + + qemu-img \ + create \ + -f qcow2 \ + -b "$(get_backing_img_path)" \ + -F qcow2 \ + "$IMG_PATH" +} + +qemu_start() { + if [ -n "$KEEP_VM" ] && [ -e "$PID_FILE" ] && kill -0 "$(cat "$PID_FILE")"; then + SSH_PORT="$(cat "$PORT_FILE")" + return + fi + + prepare_img + find_free_ssh_port + + (timeout 1h qemu-system-x86_64 \ + -cpu host \ + -device "virtio-net-pci,netdev=net" \ + -display none \ + -drive "file=$IMG_PATH,format=qcow2" \ + -enable-kvm \ + -m 1024 \ + -netdev "user,id=net,hostfwd=tcp:127.0.0.1:$SSH_PORT-:22" \ + -nodefaults \ + -pidfile "$PID_FILE" \ + -serial stdio \ + -smp 16 >"$LOG_FILE" 2>&1) & +} + +qemu_ssh() { + timeout "${TIMEOUT:-1m}" \ + sshpass -p root \ + ssh \ + -p "$SSH_PORT" \ + -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null \ + root(a)127.0.0.1 \ + -- \ + "$@" +} + +qemu_scp() { + timeout "${TIMEOUT:-1m}" \ + sshpass -p root \ + scp \ + -P "$SSH_PORT" \ + -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null \ + "$@" +} + +qemu_run_test_script() { + cat <<- EOF > "$TEST_DIR/run-inside-env.sh" + #!/bin/sh -ex + + export DISTRO="$DISTRO" + export FEED="$FEED" + export PROJ="$PROJ" + export PROJ_CONFLICT="$PROJ_CONFLICT" + export TESTS="$TESTS" + + /repo-install-test/run-inside.sh + EOF + + qemu_ssh rm -rf /repo-install-test/ + qemu_scp -r "$TEST_DIR" "root@127.0.0.1:/repo-install-test" + + TIMEOUT="1h" qemu_ssh sh -ex /repo-install-test/run-inside-env.sh +} + +qemu_print_log() { + echo + echo "Contents of $LOG_FILE:" + echo + cat "$LOG_FILE" +} + +qemu_ssh_wait() { + set +x + echo + echo "Waiting for VM to boot up..." + echo + set -x + + # PID file does not get created immediately + sleep 1 + local pid="$(cat "$PID_FILE")" + + for i in $(seq 1 6); do + if [ -z "$pid" ] || ! kill -0 "$pid"; then + set +x + echo "ERROR: qemu failed, pid: $pid" + qemu_print_log + exit 1 + fi + + if TIMEOUT=10s qemu_ssh true; then + return + fi + + sleep 1 + done + + set +x + echo "ERROR: timeout, VM did not boot up. Log file contents:" + qemu_print_log + exit 1 +} + +clean_up() { + if [ -n "$KEEP_VM" ]; then + return + fi + + if [ -e "$PID_FILE" ]; then + kill $(cat "$PID_FILE") || true + fi + + rm -f "$IMG_PATH" +} + +clean_up_trap() { + if [ -n "$INTERACTIVE" ]; then + TIMEOUT="1h" qemu_ssh bash -i + fi + + set +x + echo + echo "### Clean up ###" + echo + set -x + + trap - EXIT INT TERM 0 + + clean_up +} + check_usage -docker_images_require "$DISTRO-repo-install-test" FEED="${FEED:-nightly}" PROJ="${PROJ:-osmocom:$FEED}" -CONTAINER="$DISTRO-repo-install-test-$FEED" if [ -z "$TESTS" ]; then TESTS=" @@ -57,69 +244,18 @@ esac fi -# Try to run "systemctl status" 10 times, kill the container on failure -check_if_systemd_is_running() { - for i in $(seq 1 10); do - sleep 1 - if docker exec "$CONTAINER" systemctl status; then - return - fi - done - echo "ERROR: systemd is not running properly." - docker container kill "$CONTAINER" - exit 1 -} +clean_up +trap clean_up_trap EXIT INT TERM 0 -# Kill already running container -if [ "$(docker inspect -f '{{.State.Running}}' "$CONTAINER" 2> /dev/null)" = "true" ]; then - docker container kill "$CONTAINER" - sleep 1 -fi +qemu_start +qemu_ssh_wait -# Additional docker run arguments -args="" -if [ -n "$KEEP_CACHE" ]; then - args="$args -e KEEP_CACHE=1" - args="$args -v $OSMO_CI_DIR/_repo_install_test_cache/debian/apt:/var/cache/apt" - args="$args -v $OSMO_CI_DIR/_repo_install_test_cache/centos/dnf:/var/cache/dnf" -fi -# Run the container -# * This does not output anything, for debugging add -it and remove &. -# * /run, /tmp, cgroups, SYS_ADMIN: needed for systemd -# * SYS_NICE: needed for changing CPUScheduling{Policy,Priority} (osmo-bts systemd service files) -docker run --rm \ - -v "$OSMO_CI_DIR/scripts/repo-install-test:/repo-install-test:ro" \ - --name "$CONTAINER" \ - -e FEED="$FEED" \ - -e PROJ="$PROJ" \ - -e PROJ_CONFLICT="$PROJ_CONFLICT" \ - -e DISTRO="$DISTRO" \ - -e TESTS="$TESTS" \ - -e container=docker \ - --tmpfs /run \ - --tmpfs /run/lock \ - --tmpfs /tmp \ - -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ - --cap-add SYS_ADMIN \ - --cap-add SYS_NICE \ - $args \ - "$USER/$DISTRO-repo-install-test" \ - /lib/systemd/systemd & -check_if_systemd_is_running +set +x +echo +echo "VM is running!" +echo +set -x -# Run the test script -ret=0 -if ! docker exec "$CONTAINER" /repo-install-test/run-inside-docker.sh; then - ret=1 -fi - -# Interactive shell -if [ -n "$INTERACTIVE" ]; then - docker exec -it "$CONTAINER" bash || true -fi - -docker container kill "$CONTAINER" - -exit $ret +qemu_run_test_script diff --git a/scripts/repo-install-test/run-inside-docker.sh b/scripts/repo-install-test/run-inside.sh similarity index 90% rename from scripts/repo-install-test/run-inside-docker.sh rename to scripts/repo-install-test/run-inside.sh index ce71bb8..5f01524 100755 --- a/scripts/repo-install-test/run-inside-docker.sh +++ b/scripts/repo-install-test/run-inside.sh @@ -105,10 +105,9 @@ # Add repository key if ! [ -e "$release_key" ]; then - apt-get update - apt install -y wget wget -O /tmp/Release.key "https://obs.osmocom.org/projects/$proj/public_key" fi + apt-key add /tmp/Release.key echo "deb http://$obs_repo ./" > "/etc/apt/sources.list.d/$proj.list" @@ -158,30 +157,44 @@ esac } -configure_keep_cache_debian() { - rm /etc/apt/apt.conf.d/docker-clean +prepare_vm_debian() { + # fmtutil fails in tex-common postinst script. This gets installed as + # dependency of osmo-gsm-manuals-dev, but is completely unrelated to + # what we want to test here so just stub it out. + ln -sf /bin/true /usr/bin/fmtutil + echo "path-exclude=/usr/bin/fmtutil" >> /etc/dpkg/dpkg.cfg.d/stub - # "apt" will actually remove the cache by default, even if "apt-get" keeps it. - # https://unix.stackexchange.com/a/447607 - echo "Binary::apt::APT::Keep-Downloaded-Packages "true";" \ - > /etc/apt/apt.conf.d/01keep-debs -} - -configure_keep_cache_centos() { - echo "keepcache=1" >> /etc/dnf/dnf.conf -} - -configure_keep_cache() { - if [ -z "$KEEP_CACHE" ]; then - return - fi + apt-get update --allow-releaseinfo-change + apt-get install -y --no-install-recommends \ + aptitude \ + ca-certificates \ + gnupg2 \ + wget case "$DISTRO" in + debian10) + # Can't access https://osmocom.org otherwise + apt-get install -y --no-install-recommends \ + libgnutls30 + ;; + esac +} + +prepare_vm_centos() { + # Install dnf-utils for repoquery + dnf install -y dnf-utils + + # Make additional development libraries available + yum config-manager --set-enabled powertools +} + +prepare_vm() { + case "$DISTRO" in debian*) - configure_keep_cache_debian + prepare_vm_debian ;; centos*) - configure_keep_cache_centos + prepare_vm_centos ;; esac } @@ -402,7 +415,7 @@ } check_env -configure_keep_cache +prepare_vm configure_osmocom_repo "$PROJ" for test in $TESTS; do -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30505 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ie7f1bccb05779cb3614016c0b965b810bbb1471b Gerrit-Change-Number: 30505 Gerrit-PatchSet: 2 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-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: repo-install-test: print osmocom_packages_all.txt
by fixeria 09 Dec '22

09 Dec '22
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30512 ) Change subject: repo-install-test: print osmocom_packages_all.txt ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30512 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ifbf4ca7f49c1f4441f84695aea0936515e01ffd4 Gerrit-Change-Number: 30512 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Dec 2022 10:55:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: jobs/repo-install-test: adjust for qemu
by fixeria 09 Dec '22

09 Dec '22
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30511 ) Change subject: jobs/repo-install-test: adjust for qemu ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30511 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ie7675811d1a5d6b7cf7e4378c86d747ef6f7a249 Gerrit-Change-Number: 30511 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Dec 2022 10:54:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: repo-install-test: update test_binaries
by fixeria 09 Dec '22

09 Dec '22
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30510 ) Change subject: repo-install-test: update test_binaries ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30510 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iaad0260b5872d29b41a97aac3ea5ba0af81c6adb Gerrit-Change-Number: 30510 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Dec 2022 10:54:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: repo-install-test: add SKIP_PREPARE_VM env var
by osmith 09 Dec '22

09 Dec '22
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30506 ) Change subject: repo-install-test: add SKIP_PREPARE_VM env var ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30506 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I96c7aef70d9d2c6318ce4e43c24450461bc00d91 Gerrit-Change-Number: 30506 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-Comment-Date: Fri, 09 Dec 2022 10:54:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: repo-install-test: run inside qemu + kvm
by osmith 09 Dec '22

09 Dec '22
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30505 ) Change subject: repo-install-test: run inside qemu + kvm ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30505 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ie7f1bccb05779cb3614016c0b965b810bbb1471b Gerrit-Change-Number: 30505 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-Comment-Date: Fri, 09 Dec 2022 10:54:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.