Commit 102b115b authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Forward-port changes made to readd in 1.2 Fix typo in message Don't add readded node to node list Make sure readd isn't done for master node

Reviewed-by: iustinp
parent 4e713df6
......@@ -1862,7 +1862,9 @@ class LUAddNode(LogicalUnit):
# Distribute updated /etc/hosts and known_hosts to all nodes,
# including the node just added
myself = self.cfg.GetNodeInfo(self.sstore.GetMasterNode())
dist_nodes = self.cfg.GetNodeList() + [node]
dist_nodes = self.cfg.GetNodeList()
if not self.op.readd:
if in dist_nodes:
......@@ -258,14 +258,19 @@ def main():
if qa_config.TestEnabled('tags'):
if qa_config.TestEnabled('node-readd'):
master = qa_config.GetMasterNode()
pnode = qa_config.AcquireNode(exclude=master)
RunTest(qa_node.TestNodeReadd, pnode)
pnode = qa_config.AcquireNode()
if qa_config.TestEnabled('tags'):
RunTest(qa_tags.TestNodeTags, pnode)
if qa_config.TestEnabled('node-readd'):
RunTest(qa_node.TestNodeReadd, pnode)
if qa_config.TestEnabled('instance-add-plain-disk'):
instance = RunTest(qa_instance.TestInstanceAddWithPlainDisk, pnode)
......@@ -35,7 +35,7 @@ def _NodeAdd(node, readd=False):
if not readd and node.get('_added', False):
raise qa_error.Error("Node %s already in cluster" % node['primary'])
elif readd and not node.get('_added', False):
raise qa_error.Error("Node not yet %s in cluster" % node['primary'])
raise qa_error.Error("Node %s not yet in cluster" % node['primary'])
cmd = ['gnt-node', 'add']
if node.get('secondary', None):
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