Commit 5e2e45b7 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Improve assertion message in LUClusterVerifyGroup



In issue 240 this assertion fails. While reproducing was not possible
with the master branch, having a more verbose message can't hurt.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent be862db9
......@@ -3167,7 +3167,12 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
len(s) == 2 for s in statuses)
for inst, nnames in instdisk.items()
for nname, statuses in nnames.items())
assert set(instdisk) == set(instanceinfo), "instdisk consistency failure"
if __debug__:
instdisk_keys = set(instdisk)
instanceinfo_keys = set(instanceinfo)
assert instdisk_keys == instanceinfo_keys, \
("instdisk keys (%s) do not match instanceinfo keys (%s)" %
(instdisk_keys, instanceinfo_keys))
 
return instdisk
 
......
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