aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-07-21 01:26:44 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2020-07-25 16:10:10 +0200
commitc916d56f2a6c086c1b74fca8043ecdc4354ea348 (patch)
treed5dbe99e9c3409a817fe55d7278516c7e7356d8b /docker
parent74633888529986119c0786de80b23e07ee18dec4 (diff)
Create new server test_reboot_server_hard
It sometimes fail in all gates [1] This hack could highlight if it's a timeout issue or race conditions between all tempest tests. [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: I8d03aa10c3d822dacb983e5ca019f79e1c582c9e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit c29cdcb448cf0d61f4c48acb939d5a943c138a48)
Diffstat (limited to 'docker')
-rw-r--r--docker/tempest/Create-new-server-test_reboot_server_hard.patch66
-rw-r--r--docker/tempest/Dockerfile5
2 files changed, 70 insertions, 1 deletions
diff --git a/docker/tempest/Create-new-server-test_reboot_server_hard.patch b/docker/tempest/Create-new-server-test_reboot_server_hard.patch
new file mode 100644
index 000000000..f7bebf6e4
--- /dev/null
+++ b/docker/tempest/Create-new-server-test_reboot_server_hard.patch
@@ -0,0 +1,66 @@
+From ae89f3507b1c84d3915e4e1d9d5854f11e5bab85 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 test_reboot_server_hard
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It sometimes fail in all gates [1]
+This hack could highlight if it's a timeout issue or race conditions
+between all tempest tests.
+
+[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>
+---
+ tempest/api/compute/servers/test_server_actions.py | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
+index d477be0eb..2e453b620 100644
+--- a/tempest/api/compute/servers/test_server_actions.py
++++ b/tempest/api/compute/servers/test_server_actions.py
+@@ -46,6 +46,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+ # The server was deleted by previous test, create a new one
+ # Use class level validation resources to avoid them being
+ # deleted once a test is over
++ LOG.info("OPNFV The server was deleted by previous test")
+ validation_resources = self.get_class_validation_resources(
+ self.os_primary)
+ server = self.create_test_server(
+@@ -55,6 +56,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+ self.__class__.server_id = server['id']
+ except Exception:
+ # Rebuild server if something happened to it during a test
++ LOG.info("OPNFV Rebuild server if something happened to it")
+ self.__class__.server_id = self.recreate_server(
+ self.server_id, validatable=True)
+
+@@ -115,6 +117,8 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+ self.os_primary)
+ # Get the time the server was last rebooted,
+ server = self.client.show_server(self.server_id)['server']
++ LOG.info("OPNFV %s", self.client.get_console_output(
++ self.server_id)['output'])
+ linux_client = remote_client.RemoteClient(
+ self.get_server_ip(server, validation_resources),
+ self.ssh_user,
+@@ -122,7 +126,12 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
+ validation_resources['keypair']['private_key'],
+ server=server,
+ servers_client=self.client)
+- boot_time = linux_client.get_boot_time()
++ try:
++ boot_time = linux_client.get_boot_time()
++ except Exception as e:
++ LOG.info("OPNFV %s", self.client.get_console_output(
++ self.server_id)['output'])
++ raise e
+
+ # NOTE: This sync is for avoiding the loss of pub key data
+ # in a server
+--
+2.27.0
+
diff --git a/docker/tempest/Dockerfile b/docker/tempest/Dockerfile
index 2981ce723..98bb87eb7 100644
--- a/docker/tempest/Dockerfile
+++ b/docker/tempest/Dockerfile
@@ -9,6 +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 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 \
@@ -46,9 +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 && \
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/Fixes-race-condition-in-test_add_remove_fixed_ip.patch \
+ /tmp/Create-new-server-test_reboot_server_hard.patch && \
apk del .build-deps