From 204b394315bd7e8d686d70ebdcf5bc17a5a92a28 Mon Sep 17 00:00:00 2001
From: yatinkarel <ykarel@redhat.com>
Date: Fri, 27 Dec 2024 13:17:20 +0530
Subject: [PATCH] Switch jobs to run on ubuntu noble

Default testing distro for epoxy cycle is ubuntu noble[1].
Also noble includes OVN latest LTS version i.e 24.03 so
removing build from source vars.
Also use crudini package instead of pip module as latest
pip don't allow modules to be install system wide.

[1] https://governance.openstack.org/tc/reference/runtimes/2025.1.html

Change-Id: I10a46b9f9aa1708b840353892e95069c0ffa5d06
---
 playbooks/preparations.yaml                         |  2 +-
 .../tests/scenario/base.py                          |  4 ++--
 .../tests/scenario/test_security_group_logging.py   |  2 +-
 zuul.d/base-nested-switch.yaml                      |  6 +++---
 zuul.d/master_jobs.yaml                             | 13 -------------
 5 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/playbooks/preparations.yaml b/playbooks/preparations.yaml
index f81b500..d8a606f 100644
--- a/playbooks/preparations.yaml
+++ b/playbooks/preparations.yaml
@@ -4,7 +4,7 @@
 
   tasks:
     - name: crudini
-      pip:
+      package:
           name: crudini
           state: present
       become: yes
diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/base.py b/whitebox_neutron_tempest_plugin/tests/scenario/base.py
index f8e5f9b..7188953 100644
--- a/whitebox_neutron_tempest_plugin/tests/scenario/base.py
+++ b/whitebox_neutron_tempest_plugin/tests/scenario/base.py
@@ -582,7 +582,7 @@ class BaseTempestWhiteboxTestCase(base.BaseTempestTestCase):
                            wait_until_active=True, timeout=30):
         host_ip = ssh_client.host
         service_name = ssh_client.exec_command(
-            "systemctl list-unit-files --type service | grep {} | "
+            "systemctl list-unit-files --type service | grep {}.service | "
             "cut -d' ' -f1".format(
                 service_alias.replace(" ", ".*"))).strip()
         LOG.debug("Restarting service '%s' on host '%s'.",
@@ -1320,7 +1320,7 @@ class BaseTempestTestCaseOvn(BaseTempestWhiteboxTestCase):
             return [cls.get_podified_ovn_db_cmd('nb'),
                     cls.get_podified_ovn_db_cmd('sb')]
         if WB_CONF.openstack_type == 'devstack':
-            sbdb = "unix:/usr/local/var/run/ovn/ovnsb_db.sock"
+            sbdb = "unix:/var/run/ovn/ovnsb_db.sock"
             nbdb = sbdb.replace('sb', 'nb')
             cmd = "sudo ovn-{}ctl --db={}"
             return [cmd.format('nb', nbdb), cmd.format('sb', sbdb)]
diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py
index 361a836..75e0122 100644
--- a/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py
+++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py
@@ -53,7 +53,7 @@ class BaseSecGroupLoggingTest(
         SG_LOG_FILE = '/var/log/messages'
         rotate_service_fix = '-crond'
     elif WB_CONF.openstack_type == 'devstack':
-        SG_LOG_FILE = '/opt/stack/logs/ovn-controller.log'
+        SG_LOG_FILE = '/var/log/ovn/ovn-controller.log'
         rotate_service_fix = ''
     else:
         SG_LOG_FILE = '/var/log/containers/stdouts/ovn_controller.log'
diff --git a/zuul.d/base-nested-switch.yaml b/zuul.d/base-nested-switch.yaml
index 40159e6..4cbdc48 100644
--- a/zuul.d/base-nested-switch.yaml
+++ b/zuul.d/base-nested-switch.yaml
@@ -1,8 +1,8 @@
 - nodeset:
-    name: whitebox-neutron-single-node-ubuntu-jammy
+    name: whitebox-neutron-single-node-ubuntu-noble
     nodes:
       - name: controller
-        label: nested-virt-ubuntu-jammy
+        label: nested-virt-ubuntu-noble
     groups:
       - name: tempest
         nodes:
@@ -16,7 +16,7 @@
       regex: ^(unmaintained|stable/(victoria|wallaby|xena|yoga|zed)).*$
       negate: true
     # Comment nodeset and vars to switch back to non nested nodes
-    nodeset: whitebox-neutron-single-node-ubuntu-jammy
+    nodeset: whitebox-neutron-single-node-ubuntu-noble
     vars: &nested_virt_vars
       devstack_localrc:
         LIBVIRT_TYPE: kvm
diff --git a/zuul.d/master_jobs.yaml b/zuul.d/master_jobs.yaml
index bca430b..701367f 100644
--- a/zuul.d/master_jobs.yaml
+++ b/zuul.d/master_jobs.yaml
@@ -59,13 +59,6 @@
         # TODO(lucasagomes): Re-enable MOD_WSGI after
         # https://bugs.launchpad.net/neutron/+bug/1912359 is implemented
         NEUTRON_DEPLOY_MOD_WSGI: false
-        # TODO(ihrachys): remove OVN_BUILD_FROM_SOURCE once the OS packages
-        # include at least OVN v22.03.3.
-        OVN_BUILD_FROM_SOURCE: True
-        # TODO(ihrachys): switch back to a tagged version when it's released
-        # OVN_BRANCH: "v22.03.3"
-        OVN_BRANCH: "36e3ab9b47e93af0599a818e9d6b2930e49473f0"
-        OVS_BRANCH: "2410b95597fcec5f733caf77febdb46f4ffacd27"
       devstack_plugins:
         neutron: https://opendev.org/openstack/neutron.git
         neutron-tempest-plugin: https://opendev.org/openstack/neutron-tempest-plugin.git
@@ -287,12 +280,6 @@
         OVN_DBS_LOG_LEVEL: dbg
         ENABLE_TLS: True
         OVN_IGMP_SNOOPING_ENABLE: True
-        # TODO(ihrachys): remove OVN_BUILD_FROM_SOURCE once the OS packages
-        # include at least OVN v22.03.3.
-        OVN_BUILD_FROM_SOURCE: True
-        OVN_BRANCH: "v23.09.0"
-        OVS_BRANCH: "v3.2.0-20-g1d78a3f31"
-        OVS_SYSCONFDIR: "/usr/local/etc/openvswitch"
       devstack_services:
         br-ex-tcpdump: true
         br-int-flows: true