Commit 0dfa2c22 authored by Michael Hanselmann's avatar Michael Hanselmann

Fix hook node list when adding node

This broke QA (and everyone trying to add a node) by complaining about
different node lists.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent dd7f6776
......@@ -4114,9 +4114,12 @@ class LUNodeAdd(LogicalUnit):
"MASTER_CAPABLE": str(self.op.master_capable),
"VM_CAPABLE": str(self.op.vm_capable),
}
nodes_0 = self.cfg.GetNodeList()
nodes_1 = nodes_0 + [self.op.node_name, ]
return env, nodes_0, nodes_1
# Exclude added node
pre_nodes = list(set(self.cfg.GetNodeList()) - set([self.op.node_name]))
post_nodes = pre_nodes + [self.op.node_name, ]
return (env, pre_nodes, post_nodes)
def CheckPrereq(self):
"""Check prerequisites.
......
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