WorkerPdsh
- class ClusterShell.Worker.Pdsh.WorkerPdsh(nodes, handler, timeout=None, **kwargs)
ClusterShell pdsh-based worker Class.
- Remote Shell (pdsh) usage example:
>>> worker = WorkerPdsh(nodeset, handler=MyEventHandler(), ... timeout=30, command="/bin/hostname") >>> task.schedule(worker) # schedule worker for execution >>> task.resume() # run
- Remote Copy (pdcp) usage example:
>>> worker = WorkerPdsh(nodeset, handler=MyEventHandler(), ... timeout=30, source="/etc/my.conf", ... dest="/etc/my.conf") >>> task.schedule(worker) # schedule worker for execution >>> task.resume() # run
- Known limitations:
write() is not supported by WorkerPdsh
return codes == 0 are not guaranteed when a timeout is used (rc > 0 are fine)
- COPY_CLASS
alias of
PdcpClient
- SHELL_CLASS
alias of
PdshClient
- set_write_eof()
Tell worker to close its writer file descriptor once flushed. Do not perform writes after this call.
Not supported by PDSH Worker.
- write(buf)
Write data to process. Not supported with Pdsh worker.
- class ClusterShell.Worker.Pdsh.PdshClient(node, command, worker, stderr, timeout, autoclose=False, rank=None)
EngineClient which run 'pdsh'
- __init__(node, command, worker, stderr, timeout, autoclose=False, rank=None)
Create an EngineClient-type instance to locally run command.
- Parameters:
node -- will be used as key.
- class ClusterShell.Worker.Pdsh.PdcpClient(node, source, dest, worker, stderr, timeout, autoclose, preserve, reverse, rank=None)
EngineClient when pdsh is run to copy file, using pdcp.
- __init__(node, source, dest, worker, stderr, timeout, autoclose, preserve, reverse, rank=None)
Create an EngineClient-type instance to locally run 'cp'.