Commit 2ca60304 authored by Iustin Pop's avatar Iustin Pop

Merge branch 'devel-2.2' into devel-2.3

* devel-2.2:
  Fix LUClusterRepairDiskSizes and rpc result usage
  Fix RPC mismatch in blockdev_getsize[s]
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parents 63ea9789 e50d8807
......@@ -2477,16 +2477,18 @@ class LURepairDiskSizes(NoHooksLU):
newl = [v[2].Copy() for v in dskl]
for dsk in newl:
self.cfg.SetDiskID(dsk, node)
result = self.rpc.call_blockdev_getsizes(node, newl)
result = self.rpc.call_blockdev_getsize(node, newl)
if result.fail_msg:
self.LogWarning("Failure in blockdev_getsizes call to node"
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)
......
......@@ -1089,7 +1089,7 @@ class RpcRunner(object):
return self._SingleNodeCall(node, "blockdev_close", params)
@_RpcTimeout(_TMO_NORMAL)
def call_blockdev_getsizes(self, node, disks):
def call_blockdev_getsize(self, node, disks):
"""Returns the size of the given disks.
This is a single-node call.
......
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