diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2020-06-04 10:14:06 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2020-06-04 10:51:05 +0200 |
commit | f30e43810bee1a4432bf6cada3226b06cffc072c (patch) | |
tree | 277bccc0b34c367cef79a749e3f8677007c2a0f6 /docker | |
parent | 3c035346e700394e2ca628a25d8a3c102f72522c (diff) |
Rename patch name and removes debug logs
The debug logs works only vs py3.8 and breaks backport to Iruya.
Change-Id: Ie91a8a876e263a83b6ae3fbfb5bb05644b87b970
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 39823fdbf534d05bfc3ddf4ddd5b8f8c3d603038)
Diffstat (limited to 'docker')
-rw-r--r-- | docker/tempest/Dockerfile | 5 | ||||
-rw-r--r-- | docker/tempest/Switch-to-threading.Thread-for-Rally-tasks.patch | 50 |
2 files changed, 54 insertions, 1 deletions
diff --git a/docker/tempest/Dockerfile b/docker/tempest/Dockerfile index 7dcfa93cf..8fbfa59cf 100644 --- a/docker/tempest/Dockerfile +++ b/docker/tempest/Dockerfile @@ -8,6 +8,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 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 \ python3-dev build-base linux-headers libffi-dev \ openssl-dev libjpeg-turbo-dev && \ @@ -27,9 +28,11 @@ RUN apk --no-cache add --virtual .build-deps --update \ update-requirements -s --source /src/openstack-requirements /src/rally-openstack && \ pip3 install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \ tempest /src/rally-openstack && \ + (cd /src/rally && patch -p1 < /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch) && \ pip3 install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \ /src/rally && \ - rm -r upper-constraints.txt upper-constraints.opnfv.txt /src/rally /src/rally-openstack && \ + rm -r upper-constraints.txt upper-constraints.opnfv.txt /src/rally /src/rally-openstack \ + /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch && \ mkdir -p /etc/rally && \ printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \ mkdir -p /var/lib/rally/database && rally db create && \ diff --git a/docker/tempest/Switch-to-threading.Thread-for-Rally-tasks.patch b/docker/tempest/Switch-to-threading.Thread-for-Rally-tasks.patch new file mode 100644 index 000000000..7c146c9ed --- /dev/null +++ b/docker/tempest/Switch-to-threading.Thread-for-Rally-tasks.patch @@ -0,0 +1,50 @@ +From 7223c6c766d2cbd47c54048426c904a27b52e069 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Ollivier?= <cedric.ollivier@orange.com> +Date: Wed, 3 Jun 2020 15:23:59 +0200 +Subject: [PATCH] Switch to threading.Thread() for Rally tasks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +multiprocessing.Process() often fails due to thread crashes [1]. +It looks similar to gsutil release notes [2]. + +[1] https://build.opnfv.org/ci/job/functest-opnfv-functest-benchmarking-cntt-latest-rally_full_cntt-run/35/console +[2] https://github.com/GoogleCloudPlatform/gsutil/issues/548 +[3] https://github.com/GoogleCloudPlatform/gsutil/blob/master/CHANGES.md + +Change-Id: I582933832e23d188c7fa5999e713dd5d7e82d2da +Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> +(cherry picked from commit 9b07423c246e7e4ab9fa25851d79ce6986c10c2e) +--- + rally/task/runner.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/rally/task/runner.py b/rally/task/runner.py +index 55372e509..0f0245588 100644 +--- a/rally/task/runner.py ++++ b/rally/task/runner.py +@@ -17,6 +17,7 @@ import abc + import collections + import copy + import multiprocessing ++import threading + import time + + import six +@@ -188,9 +189,9 @@ class ScenarioRunner(plugin.Plugin, validation.ValidatablePluginMixin): + for i in range(processes_to_start): + kwrgs = {"processes_to_start": processes_to_start, + "processes_counter": i} +- process = multiprocessing.Process(target=worker_process, +- args=next(worker_args_gen), +- kwargs={"info": kwrgs}) ++ process = threading.Thread(target=worker_process, ++ args=next(worker_args_gen), ++ kwargs={"info": kwrgs}) + process.start() + process_pool.append(process) + +-- +2.26.2 + |