From 043beb38f4e10b75d0820c361c668c441c7a6980 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Tue, 15 Feb 2011 14:39:44 +0100 Subject: [PATCH] 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: Iustin Pop Reviewed-by: Stephen Shirley Reviewed-by: Michael Hanselmann --- lib/cmdlib.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 05cf991..fa8becd 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -2579,11 +2579,13 @@ class LUClusterRepairDiskSizes(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) -- 1.7.10.4