summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-02-22 11:10:04 +0000
committerNeil Williams <codehelp@debian.org>2015-02-22 23:08:38 +0000
commita1d9f99e34efa2c9aaad664af7af2f0d35b2d662 (patch)
treeeb5cb5245ce08a88c6bfe0477007256fe796b0b1
parent8b2e3feb0dd3ec624c233d1bacc56df7c8679ea9 (diff)
Explicitly allow wait-all to occur before send0.1.6
Wait-all with role support allows for one role to wait for another, there is no need for that role to send a message. Change-Id: Ie416e6663dd0083dee036c06c06d024908d58335
-rw-r--r--lava-coordinator9
-rw-r--r--lava/coordinator.py4
-rw-r--r--setup.py2
3 files changed, 5 insertions, 10 deletions
diff --git a/lava-coordinator b/lava-coordinator
index 513cd4b..30142b1 100644
--- a/lava-coordinator
+++ b/lava-coordinator
@@ -29,15 +29,6 @@ from logging.handlers import WatchedFileHandler
from lava.coordinator import LavaCoordinator
-# noinspection PyUnusedLocal
-def signal_handler(signal, frame):
- try:
- print '\nClosing %s' % os.path.basename(__file__)
- sys.exit(os.EX_OK)
- except Exception as e:
- raise Exception('Error in signal handler: ' + str(e))
-
-
def getDaemonLogger(filePath, log_format=None, loglevel=logging.INFO):
logger = logging.getLogger()
logger.setLevel(loglevel)
diff --git a/lava/coordinator.py b/lava/coordinator.py
index 8262d76..4cc022a 100644
--- a/lava/coordinator.py
+++ b/lava/coordinator.py
@@ -377,6 +377,10 @@ class LavaCoordinator(object):
messageID = self._getMessageID(json_data)
if 'waitrole' in json_data:
for client in self.group['roles'][json_data['role']]:
+ if messageID not in self.group['waits']:
+ logging.debug("messageID %s not yet seen" % messageID)
+ self._waitResponse()
+ return
if client not in self.group['waits'][messageID]:
# FIXME: bug? if this client has not sent the messageID yet,
# causing it to wait will simply force a timeout. node needs
diff --git a/setup.py b/setup.py
index 1bc5b6e..2eb9f6a 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ from setuptools import setup, find_packages
setup(
name='lava-coordinator',
- version="0.1.5",
+ version="0.1.6",
author="Neil Williams",
author_email="neil.williams@linaro.org",
license="GPL2+",