Commit cc706abc authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix redistribution of files w.r.t. offline nodes



Currently, _RedistributeAncillaryFiles computes two lists: the list of
online nodes (for all files redistribution), and the list of
vm_capable nodes, for hypervisor-specific files. However, the
vm_capable list includes offline nodes too, leading to warning
messages:

  WARNING: Copy of file /etc/xen/xend-config.sxp to node node13.example.com failed: Node is marked offline

We fix this by trivially intersecting the vm_capable list with the
online one.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 770461fe
......@@ -4366,7 +4366,8 @@ def _RedistributeAncillaryFiles(lu, additional_nodes=None, additional_vm=True):
master_info = lu.cfg.GetNodeInfo(lu.cfg.GetMasterNode())
 
online_nodes = lu.cfg.GetOnlineNodeList()
vm_nodes = lu.cfg.GetVmCapableNodeList()
online_set = frozenset(online_nodes)
vm_nodes = list(online_set.intersection(lu.cfg.GetVmCapableNodeList()))
 
if additional_nodes is not None:
online_nodes.extend(additional_nodes)
......
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