From 9caa6673542fdd2bda72fe052a37b9788745000f Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sat, 1 Aug 2020 12:16:49 +0200 Subject: Conform with git format-patch for last tempest patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch name must conform with the last commit update. Change-Id: I493582d41080bd5d8b70d751b68af36ae61bcdc9 Signed-off-by: Cédric Ollivier (cherry picked from commit 911fee8cd8ab6c8e221145fbc935fd1f5c41d0a5) --- .../Create-new-server-in-test_create_backup.patch | 84 ++++++++++++++++++++++ ...Create-new-server-test_reboot_server_hard.patch | 84 ---------------------- docker/tempest/Dockerfile | 6 +- 3 files changed, 87 insertions(+), 87 deletions(-) create mode 100644 docker/tempest/Create-new-server-in-test_create_backup.patch delete mode 100644 docker/tempest/Create-new-server-test_reboot_server_hard.patch (limited to 'docker') diff --git a/docker/tempest/Create-new-server-in-test_create_backup.patch b/docker/tempest/Create-new-server-in-test_create_backup.patch new file mode 100644 index 000000000..1b86b0fc5 --- /dev/null +++ b/docker/tempest/Create-new-server-in-test_create_backup.patch @@ -0,0 +1,84 @@ +From 03eb38ce54aeec4bc4c1cb3475c6fb84661f8993 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Ollivier?= +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 +--- + .../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 + diff --git a/docker/tempest/Create-new-server-test_reboot_server_hard.patch b/docker/tempest/Create-new-server-test_reboot_server_hard.patch deleted file mode 100644 index 1b86b0fc5..000000000 --- a/docker/tempest/Create-new-server-test_reboot_server_hard.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 03eb38ce54aeec4bc4c1cb3475c6fb84661f8993 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?C=C3=A9dric=20Ollivier?= -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 ---- - .../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 - diff --git a/docker/tempest/Dockerfile b/docker/tempest/Dockerfile index 98bb87eb7..285d472dd 100644 --- a/docker/tempest/Dockerfile +++ b/docker/tempest/Dockerfile @@ -9,7 +9,7 @@ ARG RALLY_OPENSTACK_TAG=1.5.0 COPY Accept-custom-registered-endpoints.patch /tmp/Accept-custom-registered-endpoints.patch COPY Fixes-race-condition-in-test_add_remove_fixed_ip.patch /tmp/Fixes-race-condition-in-test_add_remove_fixed_ip.patch COPY object-storage-fix-and-cleanup-header-checks.patch /tmp/object-storage-fix-and-cleanup-header-checks.patch -COPY Create-new-server-test_reboot_server_hard.patch /tmp/Create-new-server-test_reboot_server_hard.patch +COPY Create-new-server-in-test_create_backup.patch /tmp/Create-new-server-in-test_create_backup.patch COPY Switch-to-threading.Thread-for-Rally-tasks.patch /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch RUN apk --no-cache add --virtual .build-deps --update \ python-dev build-base linux-headers libffi-dev \ @@ -47,11 +47,11 @@ RUN apk --no-cache add --virtual .build-deps --update \ patch -p1 < /tmp/Accept-custom-registered-endpoints.patch && \ patch -p1 < /tmp/object-storage-fix-and-cleanup-header-checks.patch && \ patch -p1 < /tmp/Fixes-race-condition-in-test_add_remove_fixed_ip.patch && \ - patch -p1 < /tmp/Create-new-server-test_reboot_server_hard.patch && \ + patch -p1 < /tmp/Create-new-server-in-test_create_backup.patch && \ git commit -a -m "Backport critical bugfixes" && \ rm ~/.gitconfig) && \ rm /tmp/Accept-custom-registered-endpoints.patch \ /tmp/object-storage-fix-and-cleanup-header-checks.patch \ /tmp/Fixes-race-condition-in-test_add_remove_fixed_ip.patch \ - /tmp/Create-new-server-test_reboot_server_hard.patch && \ + /tmp/Create-new-server-in-test_create_backup.patch && \ apk del .build-deps -- cgit 1.2.3-korg