Revision 38ea42a1
b/lib/cmdlib.py | ||
---|---|---|
6841 | 6841 |
raise errors.OpExecError("Error during master delay test") |
6842 | 6842 |
if self.op.on_nodes: |
6843 | 6843 |
result = self.rpc.call_test_delay(self.op.on_nodes, self.op.duration) |
6844 |
if not result: |
|
6845 |
raise errors.OpExecError("Complete failure from rpc call") |
|
6846 | 6844 |
for node, node_result in result.items(): |
6847 |
node_result.Raise()
|
|
6848 |
if not node_result.data:
|
|
6849 |
raise errors.OpExecError("Failure during rpc call to node %s,"
|
|
6850 |
" result: %s" % (node, node_result.data))
|
|
6845 |
msg = node_result.RemoteFailMsg()
|
|
6846 |
if msg:
|
|
6847 |
raise errors.OpExecError("Failure during rpc call to node %s: %s"
|
|
6848 |
% (node, msg))
|
|
6851 | 6849 |
|
6852 | 6850 |
|
6853 | 6851 |
class IAllocator(object): |
b/lib/utils.py | ||
---|---|---|
1387 | 1387 |
|
1388 | 1388 |
""" |
1389 | 1389 |
if duration < 0: |
1390 |
return False |
|
1390 |
return False, "Invalid sleep duration"
|
|
1391 | 1391 |
time.sleep(duration) |
1392 |
return True |
|
1392 |
return True, None
|
|
1393 | 1393 |
|
1394 | 1394 |
|
1395 | 1395 |
def _CloseFDNoErr(fd, retries=5): |
Also available in: Unified diff