From 6bb3b6ed4ea066ea8b66b17631bc892419beafed Mon Sep 17 00:00:00 2001 From: mbeierl Date: Fri, 9 Nov 2018 11:54:11 -0500 Subject: 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 --- docker/storperf-master/rest_server.py | 2 -- docker/storperf-master/storperf/storperf_master.py | 4 ++-- 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): -- cgit 1.2.3-korg