Commit 6520ba14 authored by Guido Trotter's avatar Guido Trotter
Browse files

Check for nodegroup uuid indexing

Since the uuid is immutable the probability of it getting out of sync
between the object and the dict key is very low. Still, checking is
cheap, so we do it to be more sure nothing is wrong.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent f9e81396
......@@ -461,6 +461,13 @@ class ConfigWriter:
(, node.master_candidate, node.drain,
# nodegroups checks
for nodegroup_uuid in data.nodegroups:
nodegroup = data.nodegroups[nodegroup_uuid]
if nodegroup.uuid != nodegroup_uuid:
result.append("nodegroup '%s' (uuid: '%s') indexed by wrong uuid '%s'"
% (, nodegroup.uuid, nodegroup_uuid))
# drbd minors check
_, duplicates = self._UnlockedComputeDRBDMap()
for node, minor, instance_a, instance_b in duplicates:
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