From 9a62ddec037c52674e9bc77f04a9c158bb565a31 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Sat, 19 Oct 2024 21:38:07 +0000 Subject: [PATCH] Update tempest jobs for Ubuntu Noble (24.04) Required by [1]. Patch added to [2]. Also setup global_venv for devstack, as newer pip don't allow dependencies install on system by default. Also ignore failures in systemctl kill in functional tests as in noble it returns invalid argument for child processes. [1]https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/JOMDY26TCW7OX3NXRGOYQCIDXNNJ4E25/ [2]https://etherpad.opendev.org/p/migrate-to-noble Depends-On: https://review.opendev.org/c/openstack/tempest/+/932156 Change-Id: I7d3b9ebf02aed10a04c3220385a7234888ed32c1 --- neutron/tests/fullstack/resources/process.py | 7 ++++++- tools/configure_for_func_testing.sh | 4 ++++ zuul.d/base.yaml | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/neutron/tests/fullstack/resources/process.py b/neutron/tests/fullstack/resources/process.py index 500a21a8bed..ed11dd08018 100644 --- a/neutron/tests/fullstack/resources/process.py +++ b/neutron/tests/fullstack/resources/process.py @@ -114,6 +114,9 @@ class ProcessFixture(fixtures.Fixture): return if kill_signal: + # systemd in ubuntu noble returns invalid-argument for some child + # processes + check_exit_code = False stop_cmd = [ 'systemctl', 'kill', @@ -124,10 +127,12 @@ class ProcessFixture(fixtures.Fixture): msg = (f'Process killed with signal {kill_signal}: ' f'{self.process_name}') else: + check_exit_code = True stop_cmd = ['systemctl', 'stop', '--no-block', self.unit_name] msg = f'Process stopped: {self.process_name}' - utils.execute(stop_cmd, run_as_root=True) + utils.execute(stop_cmd, run_as_root=True, + check_exit_code=check_exit_code) common_utils.wait_until_true(self.process_is_not_running) LOG.debug(msg) diff --git a/tools/configure_for_func_testing.sh b/tools/configure_for_func_testing.sh index 1c71595c47c..2235a29ca0c 100755 --- a/tools/configure_for_func_testing.sh +++ b/tools/configure_for_func_testing.sh @@ -100,6 +100,10 @@ function _init { # Allow the gate to override values set by stackrc. DEST=${GATE_DEST:-$DEST} STACK_USER=${GATE_STACK_USER:-$STACK_USER} + sudo mkdir -p /opt/stack/data + sudo chown -R $STACK_USER /opt/stack/data + source $DEVSTACK_PATH/inc/python + setup_devstack_virtualenv GetDistro source $DEVSTACK_PATH/tools/fixup_stuff.sh diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 672e10ab821..50c95acc1d4 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -57,6 +57,8 @@ DATABASE_PASSWORD: stackdb NEUTRON_DEPLOY_MOD_WSGI: true tox_envlist: dsvm-functional-gate + tox_environment: + PYTHONPATH: /opt/stack/data/venv/lib/python3.12/site-packages tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/openstack/requirements/upper-constraints.txt' zuul_copy_output: # We need to copy archive with logs to have it in job artifacts also,