Use a consistent ECID base
authorStephen Shirley <diamond@google.com>
Tue, 15 Feb 2011 14:06:03 +0000 (15:06 +0100)
committerStephen Shirley <diamond@google.com>
Thu, 17 Feb 2011 10:09:16 +0000 (11:09 +0100)
ECID was being calculated completely differently in
__MergeNodeGroups() and _MergeConfig()

Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

tools/cluster-merge

index 593693d..52ecfc2 100755 (executable)
@@ -274,7 +274,7 @@ class Merger(object):
       for node in other_config.GetNodeList():
         node_info = other_config.GetNodeInfo(node)
         node_info.master_candidate = False
-        my_config.AddNode(node_info, str(fake_ec_id))
+        my_config.AddNode(node_info, _CLUSTERMERGE_ECID + str(fake_ec_id))
         fake_ec_id += 1
 
       for instance in other_config.GetInstanceList():
@@ -294,7 +294,8 @@ class Merger(object):
             physical_id[1] = physical_id[3] = port
             dsk.physical_id = tuple(physical_id)
 
-        my_config.AddInstance(instance_info, str(fake_ec_id))
+        my_config.AddInstance(instance_info,
+                              _CLUSTERMERGE_ECID + str(fake_ec_id))
         fake_ec_id += 1
 
   # R0201: Method could be a function