summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2018-11-09 11:54:11 -0500
committermbeierl <mark.beierl@dell.com>2018-11-09 12:00:23 -0500
commit6bb3b6ed4ea066ea8b66b17631bc892419beafed (patch)
treee2cf0c8ebb3641769981838431ea848d14470d63
parent5b0cf21b45af885d2409df3897ea98dee498d354 (diff)
Race condition in job execute
Fixes a problem in job execution where the stack is not checked for slave IP addresses if it is still cached. Change-Id: Ie5719b233e86474b17f6ff04c6b47f8110afcc6d Signed-off-by: mbeierl <mark.beierl@dell.com>
-rw-r--r--docker/storperf-master/rest_server.py2
-rw-r--r--docker/storperf-master/storperf/storperf_master.py4
2 files changed, 2 insertions, 4 deletions
diff --git a/docker/storperf-master/rest_server.py b/docker/storperf-master/rest_server.py
index ce3a41c..547a0fd 100644
--- a/docker/storperf-master/rest_server.py
+++ b/docker/storperf-master/rest_server.py
@@ -10,7 +10,6 @@
import json
import logging.config
import os
-import sys
from flask import abort, Flask, request, jsonify
from flask_cors import CORS
@@ -424,7 +423,6 @@ the last stack named.
]
)
def delete(self):
- self.logger.info("Threads: %s" % sys._current_frames())
try:
return jsonify({'Slaves': storperf.terminate_workloads()})
except Exception as e:
diff --git a/docker/storperf-master/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py
index 76c4807..3de8478 100644
--- a/docker/storperf-master/storperf/storperf_master.py
+++ b/docker/storperf-master/storperf/storperf_master.py
@@ -62,8 +62,6 @@ class StorPerfMaster(object):
self.heat_stack = OpenStackHeatStack(self.os_creds,
self.stack_settings)
- self._cached_stack_id = None
- self._last_snaps_check_time = None
self._snaps_pool = worker_pool(20)
def reset_values(self):
@@ -93,6 +91,8 @@ class StorPerfMaster(object):
self.stackless = False
self.mkfs = None
self.mount_device = None
+ self._last_snaps_check_time = None
+ self._cached_stack_id = None
@property
def volume_count(self):