Prepare Functest 2023.1 21/75021/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Mon, 13 Oct 2025 13:05:22 +0000 (15:05 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 13 Oct 2025 13:37:13 +0000 (15:37 +0200)
Change-Id: I1e1090be559a2c5ece5fd45649fe9457fd79a620
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
27 files changed:
.gitreview
.travis.yml
README.md
ansible/site.cntt.yml
ansible/site.gate.yml
ansible/site.yml
build.sh
docker/benchmarking-cntt/Dockerfile
docker/benchmarking/Dockerfile
docker/core/Create-new-server-in-test_create_backup.patch [new file with mode: 0644]
docker/core/Dockerfile
docker/core/Fix-of-wrong-parsing-of-flavour-name-and-disk_over_c.patch [new file with mode: 0644]
docker/core/Fix-str-to-str-comparison-in-live-migration-test.patch [new file with mode: 0644]
docker/core/Fix-the-unstable_test-syntax-for-test_live_migration.patch [new file with mode: 0644]
docker/healthcheck/Dockerfile
docker/smoke-cntt/Dockerfile
docker/smoke-cntt/tempest_conf.yaml
docker/smoke/Dockerfile
docker/vnf/Dockerfile
docs/testing/user/configguide/configguide.rst
elements/functest/install.d/16-functest
functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml
functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf_ovn.yaml
functest/tests/unit/utils/test_functest_utils.py
functest/utils/functest_utils.py
tox.ini
upper-constraints.txt

index e59fef8..26eb5d6 100644 (file)
@@ -2,4 +2,4 @@
 host=gerrit.opnfv.org
 port=29418
 project=functest.git
-
+defaultbranch=stable/2023.1
index 6b6e0a6..7708b16 100644 (file)
@@ -42,8 +42,8 @@ jobs:
       script: >
         sudo manifest-tool push from-args \
           --platforms linux/amd64,linux/arm,linux/arm64 \
-          --template ${DOCKER_USERNAME}/functest-core:ARCH-latest \
-          --target ${DOCKER_USERNAME}/functest-core:latest
+          --template ${DOCKER_USERNAME}/functest-core:ARCH-2023.1 \
+          --target ${DOCKER_USERNAME}/functest-core:2023.1
     - stage: build all functest images
       script: sudo -E sh build.sh
       env:
@@ -121,23 +121,23 @@ jobs:
       script: >
         sudo manifest-tool push from-args \
           --platforms linux/amd64,linux/arm,linux/arm64 \
-          --template ${DOCKER_USERNAME}/functest-healthcheck:ARCH-latest \
-          --target ${DOCKER_USERNAME}/functest-healthcheck:latest
+          --template ${DOCKER_USERNAME}/functest-healthcheck:ARCH-2023.1 \
+          --target ${DOCKER_USERNAME}/functest-healthcheck:2023.1
     - script: >
         sudo manifest-tool push from-args \
           --platforms linux/amd64,linux/arm,linux/arm64 \
-          --template ${DOCKER_USERNAME}/functest-smoke:ARCH-latest \
-          --target ${DOCKER_USERNAME}/functest-smoke:latest
+          --template ${DOCKER_USERNAME}/functest-smoke:ARCH-2023.1 \
+          --target ${DOCKER_USERNAME}/functest-smoke:2023.1
     - script: >
         sudo manifest-tool push from-args \
           --platforms linux/amd64,linux/arm,linux/arm64 \
-          --template ${DOCKER_USERNAME}/functest-benchmarking:ARCH-latest \
-          --target ${DOCKER_USERNAME}/functest-benchmarking:latest
+          --template ${DOCKER_USERNAME}/functest-benchmarking:ARCH-2023.1 \
+          --target ${DOCKER_USERNAME}/functest-benchmarking:2023.1
     - script: >
         sudo manifest-tool push from-args \
           --platforms linux/amd64,linux/arm,linux/arm64 \
-          --template ${DOCKER_USERNAME}/functest-vnf:ARCH-latest \
-          --target ${DOCKER_USERNAME}/functest-vnf:latest
+          --template ${DOCKER_USERNAME}/functest-vnf:ARCH-2023.1 \
+          --target ${DOCKER_USERNAME}/functest-vnf:2023.1
     - stage: build all functest cntt images
       script: sudo -E sh build.sh
       env:
@@ -179,10 +179,10 @@ jobs:
       script: >
         sudo manifest-tool push from-args \
           --platforms linux/amd64,linux/arm,linux/arm64 \
-          --template ${DOCKER_USERNAME}/functest-smoke-cntt:ARCH-latest \
-          --target ${DOCKER_USERNAME}/functest-smoke-cntt:latest
+          --template ${DOCKER_USERNAME}/functest-smoke-cntt:ARCH-2023.1 \
+          --target ${DOCKER_USERNAME}/functest-smoke-cntt:2023.1
     - script: >
         sudo manifest-tool push from-args \
           --platforms linux/amd64,linux/arm,linux/arm64 \
-          --template ${DOCKER_USERNAME}/functest-benchmarking-cntt:ARCH-latest \
-          --target ${DOCKER_USERNAME}/functest-benchmarking-cntt:latest
+          --template ${DOCKER_USERNAME}/functest-benchmarking-cntt:ARCH-2023.1 \
+          --target ${DOCKER_USERNAME}/functest-benchmarking-cntt:2023.1
index 55bd4a5..c1c2457 100644 (file)
--- a/README.md
+++ b/README.md
@@ -24,7 +24,8 @@ datacenters as the lowest cost (50 euros hardware and software included).
 | Xena              | Xena               |
 | Yoga              | Yoga               |
 | Zed               | Zed                |
-| **Master**        | **next 2023.1**    |
+| **2023.1**        | **2023.1**         |
+| Master            | next 2023.2        |
 
 ## Prepare your environment
 
@@ -52,7 +53,7 @@ export OS_IDENTITY_API_VERSION=3
 export OS_REGION_NAME=XXX
 ```
 
-mkdir -p images && wget -q -O- https://git.opnfv.org/functest/plain/functest/ci/download_images.sh?h=master | sh -s -- images && ls -1 images/*
+mkdir -p images && wget -q -O- https://git.opnfv.org/functest/plain/functest/ci/download_images.sh?h=stable/2023.1 | sh -s -- images && ls -1 images/*
 ```
 images/cirros-0.5.1-aarch64-disk.img
 images/cirros-0.5.1-x86_64-disk.img
@@ -74,7 +75,7 @@ images/vyos-1.1.8-amd64.qcow2
 sudo docker run --env-file env \
     -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
     -v $(pwd)/images:/home/opnfv/functest/images \
-    opnfv/functest-healthcheck
+    opnfv/functest-healthcheck:2023.1
 ```
 
 ```
@@ -102,7 +103,7 @@ sudo docker run --env-file env \
 sudo docker run --env-file env \
     -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
     -v $(pwd)/images:/home/opnfv/functest/images \
-    opnfv/functest-smoke
+    opnfv/functest-smoke:2023.1
 ```
 
 ```
@@ -136,7 +137,7 @@ sudo docker run --env-file env \
 sudo docker run --env-file env \
     -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
     -v $(pwd)/images:/home/opnfv/functest/images \
-    opnfv/functest-smoke-cntt
+    opnfv/functest-smoke-cntt:2023.1
 ```
 
 ```
@@ -160,7 +161,7 @@ sudo docker run --env-file env \
 sudo docker run --env-file env \
     -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
     -v $(pwd)/images:/home/opnfv/functest/images \
-    opnfv/functest-benchmarking
+    opnfv/functest-benchmarking:2023.1
 ```
 
 ```
@@ -180,7 +181,7 @@ sudo docker run --env-file env \
 sudo docker run --env-file env \
     -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
     -v $(pwd)/images:/home/opnfv/functest/images \
-    opnfv/functest-benchmarking-cntt
+    opnfv/functest-benchmarking-cntt:2023.1
 ```
 
 ```
@@ -200,7 +201,7 @@ sudo docker run --env-file env \
 sudo docker run --env-file env \
     -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
     -v $(pwd)/images:/home/opnfv/functest/images \
-    opnfv/functest-vnf
+    opnfv/functest-vnf:2023.1
 ```
 
 ```
index 97660ca..97f2131 100644 (file)
@@ -4,6 +4,9 @@
   roles:
     - role: collivier.xtesting
       project: functest
+      docker_tags:
+        - 2023.1:
+            branch: stable/2023.1
       suites:
         - container: functest-healthcheck
           tests:
index 27c8032..539e2d0 100644 (file)
@@ -8,8 +8,8 @@
       gerrit_project: functest
       git_url: https://gerrit.opnfv.org/gerrit/functest
       docker_tags:
-        - latest:
-            branch: master
+        - 2023.1:
+            branch: stable/2023.1
             dependency: '3.16'
       builds:
         dependency:
index a715cd2..3f94029 100644 (file)
@@ -4,6 +4,9 @@
   roles:
     - role: collivier.xtesting
       project: functest
+      docker_tags:
+        - 2023.1:
+            branch: stable/2023.1
       suites:
         - container: functest-healthcheck
           tests:
index 033d313..80f4099 100644 (file)
--- a/build.sh
+++ b/build.sh
@@ -16,63 +16,63 @@ arm64_dirs=${arm64_dirs-${amd64_dirs}}
 build_opts="--pull=true --no-cache --force-rm=true"
 
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-core|${repo}/functest-core:amd64-latest|g" {} +
+    -e "s|opnfv/functest-core:2023.1|${repo}/functest-core:amd64-2023.1|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-smoke|${repo}/functest-smoke:amd64-latest|g" {} +
+    -e "s|opnfv/functest-smoke:2023.1|${repo}/functest-smoke:amd64-2023.1|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-benchmarking|\
-${repo}/functest-benchmarking:amd64-latest|g" {} +
+    -e "s|opnfv/functest-benchmarking:2023.1|\
+${repo}/functest-benchmarking:amd64-2023.1|g" {} +
 for dir in ${amd64_dirs}; do
     (cd "${dir}" &&
         docker build $build_opts \
-            -t "${repo}/functest-${dir##**/}:amd64-latest" .)
-        docker push "${repo}/functest-${dir##**/}:amd64-latest"
+            -t "${repo}/functest-${dir##**/}:amd64-2023.1" .)
+        docker push "${repo}/functest-${dir##**/}:amd64-2023.1"
     [ "${dir}" != "docker/core" ] &&
-        (docker rmi "${repo}/functest-${dir##**/}:amd64-latest" || true)
+        (docker rmi "${repo}/functest-${dir##**/}:amd64-2023.1" || true)
 done
 [ -n "${amd64_dirs}" ] &&
-    (docker rmi "${repo}/functest-core:amd64-latest" alpine:3.16 || true)
+    (docker rmi "${repo}/functest-core:amd64-2023.1" alpine:3.16 || true)
 find . -name Dockerfile -exec git checkout {} +
 
 find . -name Dockerfile -exec sed -i \
     -e "s|alpine:3.16|arm64v8/alpine:3.16|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-core|${repo}/functest-core:arm64-latest|g" {} +
+    -e "s|opnfv/functest-core:2023.1|${repo}/functest-core:arm64-2023.1|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-smoke|${repo}/functest-smoke:arm64-latest|g" {} +
+    -e "s|opnfv/functest-smoke:2023.1|${repo}/functest-smoke:arm64-2023.1|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-benchmarking|\
-${repo}/functest-benchmarking:arm64-latest|g" {} +
+    -e "s|opnfv/functest-benchmarking:2023.1|\
+${repo}/functest-benchmarking:arm64-2023.1|g" {} +
 for dir in ${arm64_dirs}; do
     (cd "${dir}" && docker build $build_opts \
-        -t "${repo}/functest-${dir##**/}:arm64-latest" .)
-    docker push "${repo}/functest-${dir##**/}:arm64-latest"
+        -t "${repo}/functest-${dir##**/}:arm64-2023.1" .)
+    docker push "${repo}/functest-${dir##**/}:arm64-2023.1"
     [ "${dir}" != "docker/core" ] &&
-        (docker rmi "${repo}/functest-${dir##**/}:arm64-latest" || true)
+        (docker rmi "${repo}/functest-${dir##**/}:arm64-2023.1" || true)
 done
 [ -n "${arm64_dirs}" ] &&
-    (docker rmi "${repo}/functest-core:arm64-latest" \
+    (docker rmi "${repo}/functest-core:arm64-2023.1" \
         arm64v8/alpine:3.16 || true)
 find . -name Dockerfile -exec git checkout {} +
 
 find . -name Dockerfile -exec sed -i \
     -e "s|alpine:3.16|arm32v6/alpine:3.16|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-core|${repo}/functest-core:arm-latest|g" {} +
+    -e "s|opnfv/functest-core:2023.1|${repo}/functest-core:arm-2023.1|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-smoke|${repo}/functest-smoke:arm-latest|g" {} +
+    -e "s|opnfv/functest-smoke:2023.1|${repo}/functest-smoke:arm-2023.1|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-benchmarking|\
-${repo}/functest-benchmarking:arm-latest|g" {} +
+    -e "s|opnfv/functest-benchmarking:2023.1|\
+${repo}/functest-benchmarking:arm-2023.1|g" {} +
 for dir in ${arm_dirs}; do
     (cd "${dir}" && docker build $build_opts \
-        -t "${repo}/functest-${dir##**/}:arm-latest" .)
-    docker push "${repo}/functest-${dir##**/}:arm-latest"
+        -t "${repo}/functest-${dir##**/}:arm-2023.1" .)
+    docker push "${repo}/functest-${dir##**/}:arm-2023.1"
     [ "${dir}" != "docker/core" ] &&
-        (docker rmi "${repo}/functest-${dir##**/}:arm-latest" || true)
+        (docker rmi "${repo}/functest-${dir##**/}:arm-2023.1" || true)
 done
 [ -n "${arm_dirs}" ] &&
-    (docker rmi "${repo}/functest-core:arm-latest" \
+    (docker rmi "${repo}/functest-core:arm-2023.1" \
         arm32v6/alpine:3.16 || true)
 find . -name Dockerfile -exec git checkout {} +
 
index 46acaa0..1179b94 100644 (file)
@@ -1,4 +1,4 @@
-FROM opnfv/functest-benchmarking
+FROM opnfv/functest-benchmarking:2023.1
 
 COPY testcases.yaml /etc/xtesting/testcases.yaml
 COPY blacklist.yaml /src/functest/functest/opnfv_tests/openstack/rally/blacklist.yaml
index 159c281..2458424 100644 (file)
@@ -1,7 +1,7 @@
-FROM opnfv/functest-core
+FROM opnfv/functest-core:2023.1
 
 ARG VMTP_TAG=34a82c9f3598ec7f5d8de0a6d5139b92931db4cc
-ARG NEUTRON_TAG=master
+ARG NEUTRON_TAG=unmaintained/2023.1
 
 COPY attrdict.patch /tmp/attrdict.patch
 RUN apk --no-cache add --update libxml2 libxslt && \
diff --git a/docker/core/Create-new-server-in-test_create_backup.patch b/docker/core/Create-new-server-in-test_create_backup.patch
new file mode 100644 (file)
index 0000000..1b86b0f
--- /dev/null
@@ -0,0 +1,84 @@
+From 03eb38ce54aeec4bc4c1cb3475c6fb84661f8993 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C3=A9dric=20Ollivier?= <cedric.ollivier@orange.com>
+Date: Tue, 21 Jul 2020 13:28:50 +0200
+Subject: [PATCH] Create new server in test_create_backup
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+test_reboot_server_hard sometimes fail in all gates [1].
+This hack could highlight if they are side effects between
+test_create_backup and test_reboot_server_hard.
+
+[1] http://artifacts.opnfv.org/functest/E5AZMH89OOK6/functest-opnfv-functest-smoke-cntt-hunter-tempest_full_cntt-run-142/tempest_full_cntt/tempest-report.html
+
+Change-Id: I203562f686b004094e5e18858004b7a2d26567a6
+Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
+---
+ .../api/compute/servers/test_server_actions.py    | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
+index d477be0eb..c369311d3 100644
+--- a/tempest/api/compute/servers/test_server_actions.py
++++ b/tempest/api/compute/servers/test_server_actions.py
+@@ -443,6 +443,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+         # Check if glance v1 is available to determine which client to use. We
+         # prefer glance v1 for the compute API tests since the compute image
+         # API proxy was written for glance v1.
++        newserver = self.create_test_server(wait_until='ACTIVE')
+         if CONF.image_feature_enabled.api_v1:
+             glance_client = self.os_primary.image_client
+         elif CONF.image_feature_enabled.api_v2:
+@@ -453,7 +454,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+                 '[image-feature-enabled].')
+         backup1 = data_utils.rand_name('backup-1')
+-        resp = self.client.create_backup(self.server_id,
++        resp = self.client.create_backup(newserver['id'],
+                                          backup_type='daily',
+                                          rotation=2,
+                                          name=backup1)
+@@ -481,8 +482,8 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+                                       image1_id, 'active')
+         backup2 = data_utils.rand_name('backup-2')
+-        waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
+-        resp = self.client.create_backup(self.server_id,
++        waiters.wait_for_server_status(self.client, newserver['id'], 'ACTIVE')
++        resp = self.client.create_backup(newserver['id'],
+                                          backup_type='daily',
+                                          rotation=2,
+                                          name=backup2)
+@@ -499,7 +500,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+         properties = {
+             'image_type': 'backup',
+             'backup_type': "daily",
+-            'instance_uuid': self.server_id,
++            'instance_uuid': newserver['id'],
+         }
+         params = {
+             'status': 'active',
+@@ -524,8 +525,8 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+         # create the third one, due to the rotation is 2,
+         # the first one will be deleted
+         backup3 = data_utils.rand_name('backup-3')
+-        waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
+-        resp = self.client.create_backup(self.server_id,
++        waiters.wait_for_server_status(self.client, newserver['id'], 'ACTIVE')
++        resp = self.client.create_backup(newserver['id'],
+                                          backup_type='daily',
+                                          rotation=2,
+                                          name=backup3)
+@@ -536,7 +537,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+             image3_id = data_utils.parse_image_id(resp.response['location'])
+         self.addCleanup(glance_client.delete_image, image3_id)
+         # the first back up should be deleted
+-        waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
++        waiters.wait_for_server_status(self.client, newserver['id'], 'ACTIVE')
+         glance_client.wait_for_resource_deletion(image1_id)
+         oldest_backup_exist = False
+         if CONF.image_feature_enabled.api_v1:
+-- 
+2.27.0
+
index eade50a..e29bbdf 100644 (file)
@@ -1,10 +1,14 @@
 FROM alpine:3.16
 
-ARG BRANCH=master
-ARG OPENSTACK_TAG=master
+ARG BRANCH=stable/2023.1
+ARG OPENSTACK_TAG=unmaintained/2023.1
 
 COPY Switch-to-threading.Thread-for-Rally-tasks.patch /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch
+COPY Create-new-server-in-test_create_backup.patch /tmp/Create-new-server-in-test_create_backup.patch
 COPY 9df662e053.patch /tmp/9df662e053.patch
+COPY Fix-of-wrong-parsing-of-flavour-name-and-disk_over_c.patch /tmp/Fix-of-wrong-parsing-of-flavour-name-and-disk_over_c.patch
+COPY Fix-str-to-str-comparison-in-live-migration-test.patch /tmp/Fix-str-to-str-comparison-in-live-migration-test.patch
+COPY Fix-the-unstable_test-syntax-for-test_live_migration.patch /tmp/Fix-the-unstable_test-syntax-for-test_live_migration.patch
 RUN apk -U upgrade && \
     apk --no-cache add --update \
         python3 py3-wheel libffi openssl libjpeg-turbo py3-pip bash \
@@ -37,8 +41,20 @@ RUN apk -U upgrade && \
     (cd /usr/lib/python3.10/site-packages/cinderclient && patch -p2 < /tmp/9df662e053.patch) && \
     sed -i -E /#egg=rally/d /src/functest/upper-constraints.txt && \
     sed -i -E /#egg=tempest/d /src/functest/upper-constraints.txt && \
-    rm -r /src/requirements/.git /src/functest/.git /tmp/9df662e053.patch \
-        /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch && \
+    (cd /src/tempest && \
+        git config --global user.email "opnfv-tech-discuss@lists.opnfv.org" && \
+        git config --global user.name "Functest" && \
+        patch -p1 < /tmp/Create-new-server-in-test_create_backup.patch && \
+        patch -p1 < /tmp/Fix-of-wrong-parsing-of-flavour-name-and-disk_over_c.patch && \
+        patch -p1 < /tmp/Fix-str-to-str-comparison-in-live-migration-test.patch && \
+        patch -p1 < /tmp/Fix-the-unstable_test-syntax-for-test_live_migration.patch && \
+        git commit -a -m "Backport critical bugfixes" && \
+        rm ~/.gitconfig) && \
+    rm -r /src/requirements/.git /src/functest/.git /tmp/9df662e053.patch /tmp/Fix-of-wrong-parsing-of-flavour-name-and-disk_over_c.patch \
+        /tmp/Fix-str-to-str-comparison-in-live-migration-test.patch \
+        /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch \
+        /tmp/Fix-the-unstable_test-syntax-for-test_live_migration.patch \
+        /tmp/Create-new-server-in-test_create_backup.patch && \
     mkdir -p /etc/xtesting && \
     cp /src/functest/functest/ci/logging.ini /etc/xtesting/ && \
     cp /src/functest/functest/ci/logging.debug.ini /etc/xtesting/ && \
diff --git a/docker/core/Fix-of-wrong-parsing-of-flavour-name-and-disk_over_c.patch b/docker/core/Fix-of-wrong-parsing-of-flavour-name-and-disk_over_c.patch
new file mode 100644 (file)
index 0000000..d312dd3
--- /dev/null
@@ -0,0 +1,58 @@
+From 4a3ff9b843e20c34fd74f7afb971991176b6ca73 Mon Sep 17 00:00:00 2001
+From: jskunda <jskunda@redhat.com>
+Date: Wed, 15 Nov 2023 15:03:12 +0100
+Subject: [PATCH 1/2] Fix of wrong parsing of flavour name and disk_over_commit
+ parameter
+
+In assertion of names of flavors there was wrongly used parameter
+of name. Instead of server['original_name'] we should use
+server['flavor']['original_name'].
+
+Also parameter disk_over_commit in function live_migrate_server
+is available until version 2.25[1], so we should check microversion
+before using this parameter.
+
+[1] - https://docs.openstack.org/api-ref/compute/#live-migrate-server-os-migratelive-action
+
+Change-Id: I8f03751815021ef6d335c1d90b3f183e178ce7dc
+---
+ .../scenario/test_network_advanced_server_ops.py  | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/tempest/scenario/test_network_advanced_server_ops.py b/tempest/scenario/test_network_advanced_server_ops.py
+index e630e2940..73fce18a3 100644
+--- a/tempest/scenario/test_network_advanced_server_ops.py
++++ b/tempest/scenario/test_network_advanced_server_ops.py
+@@ -206,7 +206,7 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
+             self.assertEqual(resize_flavor, server['flavor']['id'])
+         else:
+             flavor = self.flavors_client.show_flavor(resize_flavor)['flavor']
+-            self.assertEqual(flavor['name'], server['original_name'])
++            self.assertEqual(flavor['name'], server['flavor']['original_name'])
+             for key in ['ram', 'vcpus', 'disk']:
+                 self.assertEqual(flavor[key], server['flavor'][key])
+         self._wait_server_status_and_check_network_connectivity(
+@@ -261,9 +261,18 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
+             floating_ip['floating_ip_address'])
+         self.useFixture(downtime_meter)
++        migration_kwargs = {'host': None, 'block_migration': block_migration}
++
++        # check if microversion is less than 2.25 because of
++        # disk_over_commit is depracted since compute api version 2.25
++        # if min_microversion is None, it runs on version < 2.25
++        if (CONF.compute.min_microversion is None or
++            CONF.compute.min_microversion < 2.25):
++            migration_kwargs['disk_over_commit'] = False
++
+         self.admin_servers_client.live_migrate_server(
+-            server['id'], host=None, block_migration=block_migration,
+-            disk_over_commit=False)
++            server['id'], **migration_kwargs)
++
+         waiters.wait_for_server_status(self.servers_client,
+                                        server['id'], 'ACTIVE')
+-- 
+2.51.0
+
diff --git a/docker/core/Fix-str-to-str-comparison-in-live-migration-test.patch b/docker/core/Fix-str-to-str-comparison-in-live-migration-test.patch
new file mode 100644 (file)
index 0000000..3e25b1f
--- /dev/null
@@ -0,0 +1,43 @@
+From 45644f2f3ff64412ec5d930fe9cfdee6b9067fde Mon Sep 17 00:00:00 2001
+From: Martin Kopec <mkopec@redhat.com>
+Date: Thu, 18 Apr 2024 13:23:29 +0200
+Subject: [PATCH 2/2] Fix str to str comparison in live migration test
+
+The str to str comparison in the
+test_server_connectivity_live_migration_compute uses a "<"
+operation that does not work as intended. Let's fix that by using
+the tempest module created for comparing string microversions.
+
+Change-Id: Id6d18c93e8637d797404a62a23d3fcc61208fd4c
+---
+ tempest/scenario/test_network_advanced_server_ops.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/tempest/scenario/test_network_advanced_server_ops.py b/tempest/scenario/test_network_advanced_server_ops.py
+index 73fce18a3..9861540af 100644
+--- a/tempest/scenario/test_network_advanced_server_ops.py
++++ b/tempest/scenario/test_network_advanced_server_ops.py
+@@ -20,6 +20,7 @@ from tempest.common import utils
+ from tempest.common.utils import net_downtime
+ from tempest.common import waiters
+ from tempest import config
++from tempest.lib.common import api_version_request
+ from tempest.lib import decorators
+ from tempest.scenario import manager
+@@ -266,8 +267,11 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
+         # check if microversion is less than 2.25 because of
+         # disk_over_commit is depracted since compute api version 2.25
+         # if min_microversion is None, it runs on version < 2.25
++        min_v = api_version_request.APIVersionRequest(
++            CONF.compute.min_microversion)
++        api_v = api_version_request.APIVersionRequest('2.25')
+         if (CONF.compute.min_microversion is None or
+-            CONF.compute.min_microversion < 2.25):
++                min_v < api_v):
+             migration_kwargs['disk_over_commit'] = False
+         self.admin_servers_client.live_migrate_server(
+-- 
+2.51.0
+
diff --git a/docker/core/Fix-the-unstable_test-syntax-for-test_live_migration.patch b/docker/core/Fix-the-unstable_test-syntax-for-test_live_migration.patch
new file mode 100644 (file)
index 0000000..1af9845
--- /dev/null
@@ -0,0 +1,34 @@
+From 839e900510a47056f885ff86cc31cb7096862f53 Mon Sep 17 00:00:00 2001
+From: Ghanshyam Mann <gmann@ghanshyammann.com>
+Date: Fri, 15 Sep 2023 10:23:01 -0700
+Subject: [PATCH] Fix the unstable_test syntax for
+ test_live_migration_with_trunk
+
+test_live_migration_with_trunk test was marked
+as unstable in
+- https://review.opendev.org/c/openstack/tempest/+/895167
+
+but it used the wrong syntax for unstable_test
+decorator.
+
+Change-Id: I8f4f3cafe8265984470bf45a9d85b3c9f765a251
+---
+ tempest/api/compute/admin/test_live_migration.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tempest/api/compute/admin/test_live_migration.py b/tempest/api/compute/admin/test_live_migration.py
+index 1cb8004f5..fc84ed089 100644
+--- a/tempest/api/compute/admin/test_live_migration.py
++++ b/tempest/api/compute/admin/test_live_migration.py
+@@ -257,6 +257,8 @@ class LiveMigrationTest(LiveMigrationTestBase):
+         port = self.ports_client.show_port(port_id)['port']
+         return port['status'] == 'ACTIVE'
++    @decorators.unstable_test(bug='2024160')
++    @decorators.unstable_test(bug='2033887')
+     @decorators.attr(type='multinode')
+     @decorators.idempotent_id('0022c12e-a482-42b0-be2d-396b5f0cffe3')
+     @utils.requires_ext(service='network', extension='trunk')
+-- 
+2.51.0
+
index bddfc11..97edce6 100644 (file)
@@ -1,4 +1,4 @@
-FROM opnfv/functest-core
+FROM opnfv/functest-core:2023.1
 
 COPY testcases.yaml /etc/xtesting/testcases.yaml
 CMD ["run_tests", "-t", "all"]
index a8e8a6f..8230f7a 100644 (file)
@@ -1,4 +1,4 @@
-FROM opnfv/functest-smoke
+FROM opnfv/functest-smoke:2023.1
 
 COPY testcases.yaml /etc/xtesting/testcases.yaml
 COPY tempest_conf.yaml /src/functest/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml
index d9f8789..adee958 100644 (file)
@@ -1,6 +1,5 @@
 ---
 compute:
-    min_microversion: 2.44
     max_microversion: 2.88
 compute-feature-enabled:
     attach_encrypted_volume: false
index d79b742..39c5615 100644 (file)
@@ -1,19 +1,19 @@
-FROM opnfv/functest-core
+FROM opnfv/functest-core:2023.1
 
-ARG PATROLE_TAG=master
-ARG NEUTRON_TEMPEST_TAG=master
-ARG CINDER_TEMPEST_TAG=master
-ARG KEYSTONE_TEMPEST_TAG=master
-ARG NEUTRON_TAG=master
-ARG GLANCE_TAG=master
-ARG NOVA_TAG=master
-ARG KEYSTONE_TAG=master
-ARG CINDER_TAG=master
-ARG BARBICAN_TAG=master
-ARG OCTAVIA_TAG=master
-ARG HEAT_TEMPEST_TAG=master
-ARG TELEMETRY_TEMPEST_TAG=master
-ARG CYBORG_TEMPEST_TAG=master
+ARG PATROLE_TAG=0.16.0
+ARG NEUTRON_TEMPEST_TAG=2.1.0
+ARG CINDER_TEMPEST_TAG=1.8.0
+ARG KEYSTONE_TEMPEST_TAG=0.11.0
+ARG NEUTRON_TAG=unmaintained/2023.1
+ARG GLANCE_TAG=unmaintained/2023.1
+ARG NOVA_TAG=unmaintained/2023.1
+ARG KEYSTONE_TAG=unmaintained/2023.1
+ARG CINDER_TAG=unmaintained/2023.1
+ARG BARBICAN_TAG=2.0.0
+ARG OCTAVIA_TAG=2.1.0
+ARG HEAT_TEMPEST_TAG=1.7.0
+ARG TELEMETRY_TEMPEST_TAG=1.8.0
+ARG CYBORG_TEMPEST_TAG=2.1.0
 
 RUN apk --no-cache add --update libxml2 libxslt && \
     apk --no-cache add --virtual .build-deps --update \
index 279cfab..e75fc7d 100644 (file)
@@ -1,4 +1,4 @@
-FROM opnfv/functest-core
+FROM opnfv/functest-core:2023.1
 
 ARG VIMS_TEST_TAG=release-130
 ARG QUAFF_TAG=59213d6d8ee29433552bb75f505cdc96b0b18909
index c6ae367..c0c7c81 100644 (file)
@@ -51,7 +51,7 @@ See section on OpenStack credentials for details.
 
 Create a directory for the different images (attached as a Docker volume)::
 
-  mkdir -p images && wget -q -O- https://git.opnfv.org/functest/plain/functest/ci/download_images.sh?h=master | sh -s -- images && ls -1 images/*
+  mkdir -p images && wget -q -O- https://git.opnfv.org/functest/plain/functest/ci/download_images.sh?h=stable/2023.1 | sh -s -- images && ls -1 images/*
 
   images/cirros-0.5.1-aarch64-disk.img
   images/cirros-0.5.1-x86_64-disk.img
@@ -74,7 +74,7 @@ Run healthcheck suite::
   sudo docker run --env-file env \
       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
       -v $(pwd)/images:/home/opnfv/functest/images \
-      opnfv/functest-healthcheck
+      opnfv/functest-healthcheck:2023.1
 
 Results shall be displayed as follows::
 
@@ -105,7 +105,7 @@ Run smoke suite::
   sudo docker run --env-file env \
       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
       -v $(pwd)/images:/home/opnfv/functest/images \
-      opnfv/functest-smoke
+      opnfv/functest-smoke:2023.1
 
 Results shall be displayed as follows::
 
@@ -143,7 +143,7 @@ Run smoke-cntt suite::
   sudo docker run --env-file env \
       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
       -v $(pwd)/images:/home/opnfv/functest/images \
-      opnfv/functest-smoke-cntt
+      opnfv/functest-smoke-cntt:2023.1
 
 Results shall be displayed as follows::
 
@@ -168,7 +168,7 @@ Run benchmarking suite::
   sudo docker run --env-file env \
       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
       -v $(pwd)/images:/home/opnfv/functest/images \
-      opnfv/functest-benchmarking
+      opnfv/functest-benchmarking:2023.1
 
 Results shall be displayed as follows::
 
@@ -192,7 +192,7 @@ Run benchmarking-cntt suite::
   sudo docker run --env-file env \
       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
       -v $(pwd)/images:/home/opnfv/functest/images \
-      opnfv/functest-benchmarking-cntt
+      opnfv/functest-benchmarking-cntt:2023.1
 
 Results shall be displayed as follows::
 
@@ -213,7 +213,7 @@ Run vnf suite::
   sudo docker run --env-file env \
       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
       -v $(pwd)/images:/home/opnfv/functest/images \
-      opnfv/functest-vnf
+      opnfv/functest-vnf:2023.1
 
 Results shall be displayed as follows::
 
index 97d37e4..ecf841f 100755 (executable)
@@ -1,14 +1,17 @@
 #!/bin/bash
 
 download-frozen-image-v2.sh /data/docker/functest \
-  opnfv/functest-healthcheck:latest \
-  opnfv/functest-smoke:latest \
-  opnfv/functest-smoke-cntt:latest \
-  opnfv/functest-benchmarking:latest \
-  opnfv/functest-benchmarking-cntt:latest \
-  opnfv/functest-vnf:latest
+  opnfv/functest-healthcheck:2023.1 \
+  opnfv/functest-smoke:2023.1 \
+  opnfv/functest-smoke-cntt:2023.1 \
+  opnfv/functest-benchmarking:2023.1 \
+  opnfv/functest-benchmarking-cntt:2023.1 \
+  opnfv/functest-vnf:2023.1
 mkdir -p /data/images && wget -q -O- https://git.opnfv.org/functest/plain/functest/ci/download_images.sh | sh -s -- /data/images && ls -1 /data/images/*
-git clone https://git.opnfv.org/functest /home/debian/functest
+git init /home/debian/functest && \
+(cd /home/debian/functest && \
+  git fetch --tags https://git.opnfv.org/functest stable/2023.1 && \
+  git checkout FETCH_HEAD) && \
 chown -R 1000:1000 /home/debian/functest
 
 exit 0
index 9a0fd98..7bd6cfc 100644 (file)
@@ -1,7 +1,6 @@
 ---
 compute:
-    min_microversion: 2.44
-    max_microversion: latest
+    max_microversion: 2.95
 compute-feature-enabled:
     attach_encrypted_volume: false
     block_migration_for_live_migration: false
@@ -57,14 +56,14 @@ network-feature-enabled:
     port_admin_state_change: true
     port_security: true
 placement:
-    max_microversion: latest
+    max_microversion: 1.39
 validation:
     image_ssh_user: cirros
     ssh_timeout: 196
     ip_version_for_ssh: 4
     run_validation: true
 volume:
-    max_microversion: latest
+    max_microversion: '3.70'
     storage_protocol: ceph
     manage_volume_ref: source-name,volume-%s
     manage_snapshot_ref: source-name,snapshot-%s
index a76449e..16dae78 100644 (file)
@@ -1,7 +1,6 @@
 ---
 compute:
-    min_microversion: 2.44
-    max_microversion: latest
+    max_microversion: 2.95
 compute-feature-enabled:
     attach_encrypted_volume: false
     block_migration_for_live_migration: false
@@ -57,14 +56,14 @@ network-feature-enabled:
     port_admin_state_change: true
     port_security: true
 placement:
-    max_microversion: latest
+    max_microversion: 1.39
 validation:
     image_ssh_user: cirros
     ssh_timeout: 196
     ip_version_for_ssh: 4
     run_validation: true
 volume:
-    max_microversion: latest
+    max_microversion: '3.70'
     storage_protocol: ceph
     manage_volume_ref: source-name,volume-%s
     manage_snapshot_ref: source-name,snapshot-%s
index dcbe559..380ad65 100644 (file)
@@ -351,6 +351,14 @@ class FunctestUtilsTesting(unittest.TestCase):
             cloud), "Zed")
         args[0].assert_called_once_with(cloud)
 
+    @mock.patch('functest.utils.functest_utils.get_nova_version',
+                return_value=(2, 95))
+    def test_openstack_version17(self, *args):
+        cloud = mock.Mock()
+        self.assertEqual(functest_utils.get_openstack_version(
+            cloud), "2023.1")
+        args[0].assert_called_once_with(cloud)
+
     @mock.patch('functest.utils.functest_utils.get_nova_version',
                 return_value=None)
     def test_openstack_version_exc(self, *args):
index 4ef2c42..97ef1a9 100644 (file)
@@ -112,8 +112,10 @@ def get_openstack_version(cloud):
     version = get_nova_version(cloud)
     try:
         assert version
-        if version > (2, 93):
+        if version > (2, 95):
             osversion = "Master"
+        elif version > (2, 93):
+            osversion = "2023.1"
         elif version > (2, 90):
             osversion = "Zed"
         elif version > (2, 88):
diff --git a/tox.ini b/tox.ini
index 79e801a..ed4cc3c 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,7 @@ envlist = docs,pep8,pylint,yamllint,bashate,bandit,py310,cover,perm,pre-commit
 usedevelop = True
 deps =
   -c{toxinidir}/upper-constraints.txt
-  -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
+  -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/unmaintained/2023.1/upper-constraints.txt}
   -r{toxinidir}/requirements.txt
   -r{toxinidir}/test-requirements.txt
 install_command = pip install --use-deprecated=legacy-resolver {opts} {packages}
index 8fdd684..20dd968 100644 (file)
@@ -8,7 +8,7 @@ xtesting===1.0.0
 git+https://github.com/PyCQA/bandit@3d0824676974e7e2e9635c10bc4f12e261f1dbdf#egg=bandit
 bandit===1.7.0
 ruamel.yaml.jinja2==0.2.2
--e git+https://opendev.org/openstack/tempest#egg=tempest
+-e git+https://opendev.org/openstack/tempest@34.0.0#egg=tempest
 -e git+https://opendev.org/openstack/rally.git@3.4.0#egg=rally
 git+https://opendev.org/openstack/rally-openstack.git@2.3.0#egg=rally-openstack
 git+https://github.com/xrally/xrally-kubernetes.git@2ffa85af2bff3438b6b23034b6ec6ee1de481090#egg=xrally-kubernetes