Commit 3a969900 authored by Stephen Shirley's avatar Stephen Shirley
Browse files

Add support for merging node groups

Signed-off-by: default avatarStephen Shirley <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 1a615be0
......@@ -339,13 +339,27 @@ class Merger(object):
# User wants to rename conflicts
if self.groups == _GROUPS_RENAME:
elif self.groups == _GROUPS_RENAME:
for grp in conflicts:
new_name = "%s-%s" % (, other_config.GetClusterName())"Renaming remote node group from %s to %s"
" to resolve conflict" % (, new_name)) = new_name
# User wants to merge conflicting groups
elif self.groups == 'merge':
for other_grp in conflicts:"Merging local and remote '%s' groups" %
for node_name in other_grp.members[:]:
node = other_config.GetNodeInfo(node_name)
my_grp_uuid = my_config._UnlockedLookupNodeGroup(
my_config._UnlockedAddNodeToGroup(node, my_grp_uuid) = my_grp_uuid
# Remove from list of groups to add
for grp in other_grps:
#TODO: handle node group conflicts
my_config.AddNodeGroup(grp, _CLUSTERMERGE_ECID)
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