Revision b2f29800 lib/backend.py
b/lib/backend.py | ||
---|---|---|
1755 | 1755 |
atime=atime, mtime=mtime) |
1756 | 1756 |
|
1757 | 1757 |
|
1758 |
def RunOob(oob_program, command, node, timeout): |
|
1759 |
"""Executes oob_program with given command on given node. |
|
1760 |
|
|
1761 |
@param oob_program: The path to the executable oob_program |
|
1762 |
@param command: The command to invoke on oob_program |
|
1763 |
@param node: The node given as an argument to the program |
|
1764 |
@param timeout: Timeout after which we kill the oob program |
|
1765 |
|
|
1766 |
@return: stdout |
|
1767 |
@raise RPCFail: If execution fails for some reason |
|
1768 |
|
|
1769 |
""" |
|
1770 |
result = utils.RunCmd([oob_program, command, node], timeout=timeout) |
|
1771 |
|
|
1772 |
if result.failed: |
|
1773 |
_Fail("'%s' failed with reason '%s'; output: %s", result.cmd, |
|
1774 |
result.fail_reason, result.output) |
|
1775 |
|
|
1776 |
return result.stdout |
|
1777 |
|
|
1778 |
|
|
1758 | 1779 |
def WriteSsconfFiles(values): |
1759 | 1780 |
"""Update all ssconf files. |
1760 | 1781 |
|
Also available in: Unified diff