Commit 6f68a739 authored by Iustin Pop's avatar Iustin Pop
Browse files

Convert node_verify rpc to new result style

Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent 31e22135
......@@ -469,7 +469,7 @@ def VerifyNode(what, cluster_name):
used_minors = str(err)
result[constants.NV_DRBDLIST] = used_minors
return result
return True, result
def GetVolumeList(vg_name):
......@@ -1022,7 +1022,6 @@ class LUVerifyCluster(LogicalUnit):
for node_i in nodeinfo:
node =
nresult = all_nvinfo[node].data
if node_i.offline:
feedback_fn("* Skipping offline node %s" % (node,))
......@@ -1040,11 +1039,13 @@ class LUVerifyCluster(LogicalUnit):
ntype = "regular"
feedback_fn("* Verifying node %s (%s)" % (node, ntype))
if all_nvinfo[node].failed or not isinstance(nresult, dict):
feedback_fn(" - ERROR: connection to %s failed" % (node,))
msg = all_nvinfo[node].RemoteFailMsg()
if msg:
feedback_fn(" - ERROR: while contacting node %s: %s" % (node, msg))
bad = True
nresult = all_nvinfo[node].payload
node_drbd = {}
for minor, instance in all_drbd_map[node].items():
if instance not in instanceinfo:
......@@ -2336,13 +2337,15 @@ class LUAddNode(LogicalUnit):
result = self.rpc.call_node_verify(node_verify_list, node_verify_param,
for verifier in node_verify_list:
if result[verifier].failed or not result[verifier].data:
raise errors.OpExecError("Cannot communicate with %s's node daemon"
" for remote verification" % verifier)
if result[verifier].data['nodelist']:
for failed in result[verifier].data['nodelist']:
msg = result[verifier].RemoteFailMsg()
if msg:
raise errors.OpExecError("Cannot communicate with node %s: %s" %
(verifier, msg))
nl_payload = result[verifier].payload['nodelist']
if nl_payload:
for failed in nl_payload:
feedback_fn("ssh/hostname verification failed %s -> %s" %
(verifier, result[verifier].data['nodelist'][failed]))
(verifier, nl_payload[failed]))
raise errors.OpExecError("ssh/hostname verification failed.")
if self.op.readd:
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