Revision 4e7f986e lib/cmdlib/group.py
b/lib/cmdlib/group.py | ||
---|---|---|
276 | 276 |
|
277 | 277 |
self.cfg.AssignGroupNodes(mods) |
278 | 278 |
|
279 |
@staticmethod |
|
280 |
def CheckAssignmentForSplitInstances(changes, node_data, instance_data): |
|
279 |
def CheckAssignmentForSplitInstances(self, changes, node_data, instance_data): |
|
281 | 280 |
"""Check for split instances after a node assignment. |
282 | 281 |
|
283 | 282 |
This method considers a series of node assignments as an atomic operation, |
... | ... | |
310 | 309 |
if inst.disk_template not in constants.DTS_INT_MIRROR: |
311 | 310 |
continue |
312 | 311 |
|
312 |
inst_nodes = self.cfg.GetInstanceNodes(inst) |
|
313 | 313 |
if len(set(node_data[node_uuid].group |
314 |
for node_uuid in inst.all_nodes)) > 1:
|
|
314 |
for node_uuid in inst_nodes)) > 1: |
|
315 | 315 |
previously_split_instances.add(inst.uuid) |
316 | 316 |
|
317 | 317 |
if len(set(changed_nodes.get(node_uuid, node_data[node_uuid].group) |
318 |
for node_uuid in inst.all_nodes)) > 1:
|
|
318 |
for node_uuid in inst_nodes)) > 1: |
|
319 | 319 |
all_split_instances.add(inst.uuid) |
320 | 320 |
|
321 | 321 |
return (list(all_split_instances - previously_split_instances), |
Also available in: Unified diff