Commit 41362e70 authored by Guido Trotter's avatar Guido Trotter
Browse files

Simplify target generation in DistributeConfig

Currently we get the list of nodes, and for each one extract all its info, and
just to exclude it if the name matches ours. Since the list of nodes is a list
of names just use .remove() to exclude ourself from it, and use that list

Reviewed-by: iustinp
parent 8498462b
......@@ -544,15 +544,10 @@ class ConfigWriter:
nodelist = self.GetNodeList()
myhostname = self._my_hostname
tgt_list = []
for node in nodelist:
nodeinfo = self.GetNodeInfo(node)
if == myhostname:
result = rpc.call_upload_file(tgt_list, self._cfg_file)
for node in tgt_list:
result = rpc.call_upload_file(nodelist, self._cfg_file)
for node in nodelist:
if not result[node]:
logger.Error("copy of file %s to node %s failed" %
(self._cfg_file, 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