Commit 43217ac7 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Merge branch 'stable-2.3' into devel-2.3



* stable-2.3:
  Prepare 2.3.1 release
  Fix disk status verification in LUClusterVerify
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parents d27150a9 bb2dc35a
News
====
Version 2.3.1
-------------
*(Released Mon, 20 Dec 2010)*
Released version 2.3.1~rc1 without any changes.
Version 2.3.1 rc1
-----------------
......
......@@ -2,7 +2,7 @@
m4_define([gnt_version_major], [2])
m4_define([gnt_version_minor], [3])
m4_define([gnt_version_revision], [1])
m4_define([gnt_version_suffix], [~rc1])
m4_define([gnt_version_suffix], [])
m4_define([gnt_version_full],
m4_format([%d.%d.%d%s],
gnt_version_major, gnt_version_minor,
......
......@@ -1915,6 +1915,10 @@ class LUVerifyCluster(LogicalUnit):
@param node_image: Node objects
@type instanceinfo: dict of (name, L{objects.Instance})
@param instanceinfo: Instance objects
@rtype: {instance: {node: [(succes, payload)]}}
@return: a dictionary of per-instance dictionaries with nodes as
keys and disk information as values; the disk information is a
list of tuples (success, payload)
"""
_ErrorIf = self._ErrorIf # pylint: disable-msg=C0103
......@@ -1959,20 +1963,27 @@ class LUVerifyCluster(LogicalUnit):
instdisk = {}
for (nname, nres) in result.items():
if nres.offline:
# Ignore offline node
continue
disks = node_disks[nname]
msg = nres.fail_msg
_ErrorIf(msg, self.ENODERPC, nname,
"while getting disk information: %s", nres.fail_msg)
if msg:
if nres.offline:
# No data from this node
data = len(disks) * [None]
data = len(disks) * [(False, "node offline")]
else:
data = nres.payload
msg = nres.fail_msg
_ErrorIf(msg, self.ENODERPC, nname,
"while getting disk information: %s", msg)
if msg:
# No data from this node
data = len(disks) * [(False, msg)]
else:
data = []
for idx, i in enumerate(nres.payload):
if isinstance(i, (tuple, list)) and len(i) == 2:
data.append(i)
else:
logging.warning("Invalid result from node %s, entry %d: %s",
nname, idx, i)
data.append((False, "Invalid result from the remote node"))
for ((inst, _), status) in zip(disks, data):
instdisk.setdefault(inst, {}).setdefault(nname, []).append(status)
......@@ -1983,9 +1994,12 @@ class LUVerifyCluster(LogicalUnit):
instdisk[inst] = {}
assert compat.all(len(statuses) == len(instanceinfo[inst].disks) and
len(nnames) <= len(instanceinfo[inst].all_nodes)
len(nnames) <= len(instanceinfo[inst].all_nodes) and
compat.all(isinstance(s, (tuple, list)) and
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"
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