root / man / ganeti-listrunner.rst @ 56a1d5cc
History | View | Annotate | Download (2.5 kB)
1 |
ganeti-listrunner(8) Ganeti | Version @GANETI_VERSION@ |
---|---|
2 |
====================================================== |
3 |
|
4 |
NAME |
5 |
---- |
6 |
|
7 |
ganeti-listrunner - Run commands in parallel over multiple machines |
8 |
|
9 |
|
10 |
SYNOPSIS |
11 |
-------- |
12 |
|
13 |
**ganeti-listrunner** ``-l`` *logdir* |
14 |
{``-x`` *executable* | ``-c`` *shell-cmd*} |
15 |
{``-f`` *hostfile* | ``-h`` *hostlist*} |
16 |
[``-a`` *aux-file*] |
17 |
[``-b`` *batch-size*] |
18 |
[``-u`` *username*] |
19 |
[``-A``] |
20 |
|
21 |
|
22 |
DESCRIPTION |
23 |
----------- |
24 |
|
25 |
**ganeti-listrunner** is a tool to run commands in parallel over multiple |
26 |
machines. It differs from ``dsh`` or other tools in that it asks for the |
27 |
password once (if not using ``ssh-agent``) and then reuses the password to |
28 |
connect to all machines, thus being easily usable even when public key |
29 |
authentication or Kerberos authentication is not available. |
30 |
|
31 |
It can run either a command or a script (which gets uploaded first and deleted |
32 |
after execution) on a list of hosts provided either via a file (one host per |
33 |
line) or as a comma-separated list on the commandline. The output (stdout and |
34 |
stderr are merged) of the remote execution is written to a logfile. One logfile |
35 |
per host is written. |
36 |
|
37 |
|
38 |
OPTIONS |
39 |
------- |
40 |
|
41 |
The options that can be passed to the program are as follows: |
42 |
|
43 |
``-l`` *logdir* |
44 |
The directory under which the logfiles files should be written. |
45 |
|
46 |
``-x`` *executable* |
47 |
The executable to copy and run on the target hosts. |
48 |
|
49 |
``-c`` *shell-cmd* |
50 |
The shell command to run on the remote hosts. |
51 |
|
52 |
``-f`` *hostfile* |
53 |
The file with the target hosts, one hostname per line. |
54 |
|
55 |
``-h`` *hostlist* |
56 |
Comma-separated list of target hosts. |
57 |
|
58 |
``-a`` *aux-file* |
59 |
A file to copy to the target hosts. Can be given multiple times, in which case |
60 |
all files will be copied to the temporary directory. The executable or the |
61 |
shell command will be run from the (temporary) directory where these files |
62 |
have been copied. |
63 |
|
64 |
``-b`` *batch-size* |
65 |
The host list will be split into batches of batch-size which will be processed |
66 |
in parallel. The default if 15, and should be increased if faster processing |
67 |
is needed. |
68 |
|
69 |
``-u`` *username* |
70 |
Username to connect as instead of the default root username. |
71 |
|
72 |
``-A`` |
73 |
Use an existing ssh-agent instead of password authentication. |
74 |
|
75 |
|
76 |
EXIT STATUS |
77 |
----------- |
78 |
|
79 |
The exist status of the command will be zero, unless it was aborted in some way |
80 |
(e.g. ^C). |
81 |
|
82 |
|
83 |
EXAMPLE |
84 |
------- |
85 |
|
86 |
Run a command on a list of hosts:: |
87 |
|
88 |
listrunner -l logdir -c "uname -a" -h host1,host2,host3 |
89 |
|
90 |
Upload a script, some auxiliary files and run the script:: |
91 |
|
92 |
listrunner -l logdir -x runme.sh \ |
93 |
-a seed.dat -a golden.dat \ |
94 |
-h host1,host2,host3 |
95 |
|
96 |
|
97 |
SEE ALSO |
98 |
-------- |
99 |
|
100 |
dsh(1), cssh(1) |