From 651f47a801058f1c72ca770caf9e74e8c889d670 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Sat, 27 Apr 2024 16:44:46 -0700 Subject: [PATCH] Upgrade gtp5g version and enable verifiers (#261) * Get dmesg differences on failures Signed-off-by: Victor Morales * Bumpt gtp5g version to 0.8.8 Signed-off-by: Victor Morales * Add assertion to check kernel version in gtp5g playbook Signed-off-by: Victor Morales --------- Signed-off-by: Victor Morales --- e2e/e2e.sh | 2 ++ e2e/provision/init.sh | 5 +++++ e2e/provision/playbooks/roles/bootstrap/defaults/main.yml | 2 +- .../playbooks/roles/bootstrap/tasks/load-gtp5g-module.yml | 5 +++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/e2e/e2e.sh b/e2e/e2e.sh index a8036b4d..5d500bce 100755 --- a/e2e/e2e.sh +++ b/e2e/e2e.sh @@ -23,11 +23,13 @@ source "$LIBDIR/testing.sh" failed=$((0)) test_summary="" +sudo dmesg >/tmp/e2e_dmesg_base.log for t in $TESTDIR/*.sh; do if ! run_test "$t"; then failed=$((failed + 1)) [[ ${FAIL_FAST:-false} != "true" ]] || break fi + sudo dmesg >/tmp/e2e_dmesg_base.log done echo "TEST SUMMARY" echo "------------" diff --git a/e2e/provision/init.sh b/e2e/provision/init.sh index 61586aa1..a4ece629 100755 --- a/e2e/provision/init.sh +++ b/e2e/provision/init.sh @@ -32,6 +32,11 @@ function get_status { docker stats --no-stream docker ps --size fi + if [ -f /tmp/e2e_dmesg_base.log ]; then + echo "Kernel diagnostic messages:" + sudo dmesg >/tmp/e2e_dmesg_current.log + diff /tmp/e2e_dmesg_base.log /tmp/e2e_dmesg_current.log + fi if command -v kubectl >/dev/null; then echo "Draft Porch Package Revisions" kubectl get packagerevision -o jsonpath='{range .items[?(@.spec.lifecycle=="Draft")]}{.metadata.name}{"\n"}{end}' || : diff --git a/e2e/provision/playbooks/roles/bootstrap/defaults/main.yml b/e2e/provision/playbooks/roles/bootstrap/defaults/main.yml index dd24480b..789484c2 100644 --- a/e2e/provision/playbooks/roles/bootstrap/defaults/main.yml +++ b/e2e/provision/playbooks/roles/bootstrap/defaults/main.yml @@ -19,7 +19,7 @@ host_reqs: container_engine: docker gtp5g_dest: /opt/gtp5g -gtp5g_version: v0.8.3 +gtp5g_version: v0.8.8 gtp5g_tarball_url: "https://github.com/free5gc/gtp5g/archive/refs/tags/{{ gtp5g_version }}.tar.gz" k8s: diff --git a/e2e/provision/playbooks/roles/bootstrap/tasks/load-gtp5g-module.yml b/e2e/provision/playbooks/roles/bootstrap/tasks/load-gtp5g-module.yml index 8994257f..de572d20 100644 --- a/e2e/provision/playbooks/roles/bootstrap/tasks/load-gtp5g-module.yml +++ b/e2e/provision/playbooks/roles/bootstrap/tasks/load-gtp5g-module.yml @@ -17,6 +17,11 @@ - "{{ ansible_os_family | lower }}.yml" skip: true +- name: Ensure gtp5g kernel constraints + ansible.builtin.assert: + that: 'ansible_facts.kernel == "5.0.0-23-generic" or {{ ansible_facts.kernel | replace("-generic", "") is version("5.4", ">=") }}' + fail_msg: "{{ ansible_facts.kernel }} version not supported by gtp5g module" + - name: Install compilation packages and kernel development tools on {{ ansible_os_family }} become: true ansible.builtin.package: