Commit 38ea42a1 authored by Iustin Pop's avatar Iustin Pop
Browse files

Convert test_delay rpc to new style result

Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent 87f5c298
......@@ -6841,13 +6841,11 @@ class LUTestDelay(NoHooksLU):
raise errors.OpExecError("Error during master delay test")
if self.op.on_nodes:
result = self.rpc.call_test_delay(self.op.on_nodes, self.op.duration)
if not result:
raise errors.OpExecError("Complete failure from rpc call")
for node, node_result in result.items():
if not
raise errors.OpExecError("Failure during rpc call to node %s,"
" result: %s" % (node,
msg = node_result.RemoteFailMsg()
if msg:
raise errors.OpExecError("Failure during rpc call to node %s: %s"
% (node, msg))
class IAllocator(object):
......@@ -1387,9 +1387,9 @@ def TestDelay(duration):
if duration < 0:
return False
return False, "Invalid sleep duration"
return True
return True, None
def _CloseFDNoErr(fd, retries=5):
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