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