Commit 8e00939c authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Maintain node list in job queue

The code makes sure not to include the master in the list.

Reviewed-by: iustinp
parent 9113300d
......@@ -291,7 +291,13 @@ class JobQueue(object):
" check in jstore and here")
# Get initial list of nodes
self._nodes = self.context.cfg.GetNodeList()
self._nodes = set(self.context.cfg.GetNodeList())
# Remove master node
except ValueError:
# TODO: Check consistency across nodes
......@@ -333,9 +339,15 @@ class JobQueue(object):
except ValueError:
def _WriteAndReplicateFileUnlocked(self, file_name, data):
"""Writes a file locally and then replicates it to all nodes.
utils.WriteFile(file_name, data=data)
failed_nodes = 0
result = rpc.call_upload_file(nodes, file_name)
for node in nodes:
result = rpc.call_upload_file(self._nodes, file_name)
for node in self._nodes:
if not result[node]:
failed_nodes += 1
logging.error("Copy of job queue file to node %s failed", node)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment