summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2018-07-13 02:32:02 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-07-13 02:32:02 +0000
commit8d4aeadbd2a9dd7f0b8371dc53de5f4b372800b0 (patch)
tree110be36c26ec7542765f1b5d635c1555b416b25c
parent70e0f379bffcd0837fea69bdac5e9148270e257b (diff)
parent5c414e6d7e1fd830021b3b89932bf187d0c7e5cf (diff)
Merge "Make uwsgi app to not demonize"
-rw-r--r--ansible/roles/configure_uwsgi/templates/yardstick.ini.j22
-rw-r--r--docker/Dockerfile2
-rw-r--r--docker/Dockerfile.aarch64.patch7
-rw-r--r--yardstick/common/httpClient.py4
4 files changed, 9 insertions, 6 deletions
diff --git a/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2 b/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2
index 044f42acb..495febb19 100644
--- a/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2
+++ b/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2
@@ -12,7 +12,7 @@ chmod-socket = 666
callable = app_wrapper
enable-threads = true
close-on-exec = 1
-daemonize = {{ log_dir }}uwsgi.log
+logto = {{ log_dir }}/uwsgi.log
socket = {{ socket_file }}
{# If virtual environment, we need to add:
virtualenv = <virtual_env> #}
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 097bc3c3f..71ce6b584 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -51,6 +51,8 @@ EXPOSE 5000 5672
ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR}
ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR}
+# For developers: when `docker build ...` is running from YARDSTICK_REPO_DIR, please change
+# path `./exec_tests.sh` -> `./docker/exec_tests.sh``.
COPY ./exec_tests.sh /usr/local/bin/
ENV NSB_DIR="/opt/nsb_bin"
diff --git a/docker/Dockerfile.aarch64.patch b/docker/Dockerfile.aarch64.patch
index ef41cba03..472310f96 100644
--- a/docker/Dockerfile.aarch64.patch
+++ b/docker/Dockerfile.aarch64.patch
@@ -8,7 +8,7 @@ Signed-off-by: ting wu <ting.wu@enea.com>
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/docker/Dockerfile b/docker/Dockerfile
-index 62ea0d0..f2f41771 100644
+index 71ce6b58..952d0f78 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -7,9 +7,9 @@
@@ -42,6 +42,5 @@ index 62ea0d0..f2f41771 100644
+ADD http://download.cirros-cloud.net/daily/20161201/cirros-d161201-aarch64-disk.img ${IMAGE_DIR}
+ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-disk1.img ${IMAGE_DIR}
- COPY ./exec_tests.sh /usr/local/bin/
-
-
+ # For developers: when `docker build ...` is running from YARDSTICK_REPO_DIR, please change
+ # path `./exec_tests.sh` -> `./docker/exec_tests.sh``.
diff --git a/yardstick/common/httpClient.py b/yardstick/common/httpClient.py
index 54f7be670..5b7831144 100644
--- a/yardstick/common/httpClient.py
+++ b/yardstick/common/httpClient.py
@@ -26,10 +26,11 @@ class HttpClient(object):
while True:
try:
response = requests.post(url, data=data, headers=headers)
+ response.raise_for_status()
result = response.json()
logger.debug('The result is: %s', result)
return result
- except Exception:
+ except Exception: # pylint: disable=broad-except
if time.time() > t_end:
logger.exception('')
raise
@@ -37,4 +38,5 @@ class HttpClient(object):
def get(self, url):
response = requests.get(url)
+ response.raise_for_status()
return response.json()