Commit e50d8807 authored by Iustin Pop's avatar Iustin Pop

Fix LUClusterRepairDiskSizes and rpc result usage

This LU was introduced before the RPC result conversion from .data to
.payload, and it has managed to keep the old-style usage (how? it's
the only LU that does so). Fix by changing to payload, and add some
extra logging for easier diagnose.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarStephen Shirley <diamond@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
(cherry picked from commit 043beb38)
parent 4ae52cc6
......@@ -2489,11 +2489,13 @@ class LURepairDiskSizes(NoHooksLU):
self.LogWarning("Failure in blockdev_getsize call to node"
" %s, ignoring", node)
continue
if len(result.data) != len(dskl):
if len(result.payload) != len(dskl):
logging.warning("Invalid result from node %s: len(dksl)=%d,"
" result.payload=%s", node, len(dskl), result.payload)
self.LogWarning("Invalid result from node %s, ignoring node results",
node)
continue
for ((instance, idx, disk), size) in zip(dskl, result.data):
for ((instance, idx, disk), size) in zip(dskl, result.payload):
if size is None:
self.LogWarning("Disk %d of instance %s did not return size"
" information, ignoring", idx, instance.name)
......
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