Package ClusterShell :: Package Worker :: Module Tree :: Class WorkerTree
[hide private]
[frames] | no frames]

Class WorkerTree

source code


ClusterShell tree worker Class.

Instance Methods [hide private]
 
__init__(self, nodes, handler, timeout, **kwargs)
Initialize Tree worker instance.
source code
 
_set_task(self, task)
Bind worker to task.
source code
 
_launch(self, nodes) source code
 
_distribute(self, fanout, dst_nodeset)
distribute target nodes between next hop gateways
source code
 
_copy_remote(self, source, dest, targets, gateway, timeout, reverse)
run a remote copy in tree mode (using gateway)
source code
 
_execute_remote(self, cmd, targets, gateway, timeout)
run command against a remote node via a gateway
source code
 
_engine_clients(self)
Access underlying engine clients.
source code
 
_on_remote_node_msgline(self, node, msg, sname, gateway)
remote msg received
source code
 
_on_remote_node_rc(self, node, rc, gateway)
remote rc received
source code
 
_on_remote_node_timeout(self, node, gateway)
remote node timeout received
source code
 
_on_node_rc(self, node, rc)
Command return code received.
source code
 
_on_node_timeout(self, node)
Update on node timeout.
source code
 
_check_ini(self) source code
 
_check_fini(self, gateway=None) source code
 
_write_remote(self, buf)
Write buf to remote clients only.
source code
 
write(self, buf)
Write to worker clients.
source code
 
set_write_eof(self)
Tell worker to close its writer file descriptor once flushed.
source code
 
abort(self)
Abort processing any action by this worker.
source code

Inherited from Worker.DistantWorker: iter_buffers, iter_errors, iter_keys_timeout, iter_node_buffers, iter_node_errors, iter_node_retcodes, iter_retcodes, last_error, last_node, last_read, last_retcode, node_buffer, node_error, node_error_buffer, node_rc, node_retcode, num_timeout

Inherited from Worker.DistantWorker (private): _on_node_msgline

Inherited from Worker.Worker: did_timeout, flush_buffers, flush_errors, read

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  UNTAR_CMD_FMT = 'tar -xf - -C \'%s\''
  TAR_CMD_FMT = 'tar -cf - -C \'%s\' --transform "s,^\\([^/]*\\)...

Inherited from Worker.Worker: SNAME_STDERR, SNAME_STDIN, SNAME_STDOUT

Instance Variables [hide private]

Inherited from Worker.Worker: current_errmsg, current_msg, current_node, current_rc, current_sname, eh, started, task

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, nodes, handler, timeout, **kwargs)
(Constructor)

source code 

Initialize Tree worker instance.

:param nodes: Targeted nodeset. :param handler: Worker EventHandler. :param timeout: Timeout value for worker. :param command: Command to execute. :param topology: Force specific TopologyTree. :param newroot: Root node of TopologyTree.

Overrides: object.__init__

_set_task(self, task)

source code 

Bind worker to task. Called by task.schedule(). WorkerTree metaworker: override to schedule sub-workers.

Overrides: Worker.Worker._set_task

_engine_clients(self)

source code 

Access underlying engine clients.

Overrides: Worker.Worker._engine_clients

_on_node_rc(self, node, rc)

source code 

Command return code received.

Overrides: Worker.DistantWorker._on_node_rc
(inherited documentation)

_on_node_timeout(self, node)

source code 

Update on node timeout.

Overrides: Worker.DistantWorker._on_node_timeout
(inherited documentation)

set_write_eof(self)

source code 

Tell worker to close its writer file descriptor once flushed. Do not perform writes after this call.

abort(self)

source code 

Abort processing any action by this worker.

Overrides: Worker.Worker.abort

Class Variable Details [hide private]

TAR_CMD_FMT

Value:
'tar -cf - -C \'%s\' --transform "s,^\\([^/]*\\)[/]*,\\1.$(hostname -s\
)/," \'%s\' | base64 -w 65536'