Commit a8f2733b authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Klaus Aehlig

Fix DRBD version check for non VM capable nodes

Commit 742dc8de revealed a bug concerning DRBD version check during
cluster verify: In case non VM cabables nodes have DRBD not
installed, we get a version mismatch warning.

VerifyNode() updates the NV_DRBDVERSION key in the response message
only if a node is VM capable. Even if noded fails to retrieve the
DRBD version, the error string is returned.

Thus we must first check in _VerifyGroupDRBDVersion() if the
NV_DRBDVERSION key of the response message is updated and
then verify if we have different versions across nodes.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent d9ef8346
......@@ -1952,8 +1952,9 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
for node_uuid, ndata in node_verify_infos.items():
nresult = ndata.payload
if nresult:
version = nresult.get(constants.NV_DRBDVERSION, "Missing DRBD version")
node_versions[node_uuid] = version
version = nresult.get(constants.NV_DRBDVERSION, None)
if version:
node_versions[node_uuid] = version
if len(set(node_versions.values())) > 1:
for node_uuid, version in sorted(node_versions.items()):
......
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