Statistics
| Branch: | Tag: | Revision:

root / man / gnt-cluster.sgml @ 73415719

History | View | Annotate | Download (10.9 kB)

1
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2

    
3
  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4
  <!-- Please adjust the date whenever revising the manpage. -->
5
  <!ENTITY dhdate      "<date>June 20, 2007</date>">
6
  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
7
       allowed: see man(7), man(1). -->
8
  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
9
  <!ENTITY dhucpackage "<refentrytitle>gnt-cluster</refentrytitle>">
10
  <!ENTITY dhpackage   "gnt-cluster">
11

    
12
  <!ENTITY debian      "<productname>Debian</productname>">
13
  <!ENTITY gnu         "<acronym>GNU</acronym>">
14
  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
15
  <!ENTITY footer SYSTEM "footer.sgml">
16
]>
17

    
18
<refentry>
19
  <refentryinfo>
20
    <copyright>
21
      <year>2006</year>
22
      <year>2007</year>
23
      <holder>Google Inc.</holder>
24
    </copyright>
25
    &dhdate;
26
  </refentryinfo>
27
  <refmeta>
28
    &dhucpackage;
29

    
30
    &dhsection;
31
    <refmiscinfo>ganeti 1.2</refmiscinfo>
32
  </refmeta>
33
  <refnamediv>
34
    <refname>&dhpackage;</refname>
35

    
36
    <refpurpose>ganeti administration, cluster-wide</refpurpose>
37
  </refnamediv>
38
  <refsynopsisdiv>
39
    <cmdsynopsis>
40
      <command>&dhpackage; </command>
41

    
42
      <arg choice="req">command</arg>
43
      <arg>arguments...</arg>
44
    </cmdsynopsis>
45
  </refsynopsisdiv>
46
  <refsect1>
47
    <title>DESCRIPTION</title>
48

    
49
    <para>
50
      The <command>&dhpackage;</command> is used for cluster-wide
51
      administration in the ganeti system.
52
    </para>
53

    
54
  </refsect1>
55
  <refsect1>
56
    <title>COMMANDS</title>
57

    
58
    <refsect2>
59
      <title>ADD-TAGS</title>
60

    
61
      <cmdsynopsis>
62
        <command>add-tags</command>
63
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
64
        <arg choice="req"
65
        rep="repeat"><replaceable>tag</replaceable></arg>
66
      </cmdsynopsis>
67

    
68
      <para>
69
        Add tags to the cluster. If any of the tags contains invalid
70
        characters, the entire operation will abort.
71
      </para>
72

    
73
      <para>
74
        If the <option>--from</option> option is given, the list of
75
        tags will be extended with the contents of that file (each
76
        line becomes a tag). In this case, there is not need to pass
77
        tags on the command line (if you do, both sources will be
78
        used). A file name of - will be interpreted as stdin.
79
      </para>
80
    </refsect2>
81

    
82
    <refsect2>
83
      <title>COMMAND</title>
84

    
85
      <cmdsynopsis>
86
        <command>command</command>
87
        <arg>-n <replaceable>node</replaceable></arg>
88
        <arg choice="req"><replaceable>command</replaceable></arg>
89
      </cmdsynopsis>
90

    
91
      <para>
92
        Executes a command on all nodes. If the option
93
        <option>-n</option> is not given, the command will be executed
94
        on all nodes, otherwise it will be executed only on the
95
        node(s) specified. Use the option multiple times for running
96
        it on multiple nodes, like:
97

    
98
        <screen>
99
          # gnt-cluster command -n node1.example.com -n node2.example.com date
100
        </screen>
101

    
102
      </para>
103

    
104
      <para>
105
        The command is constructed by concatenating all other command
106
        line arguments. For example, to list the contents of the
107
        <filename class="directory">/etc</filename> directory on all
108
        nodes, run:
109

    
110
        <screen>
111
          # gnt-cluster command ls -l /etc
112
        </screen>
113

    
114
        and the command which will be executed will be
115
        <computeroutput>"ls -l /etc"</computeroutput>
116
      </para>
117
    </refsect2>
118

    
119
    <refsect2>
120
      <title>COPYFILE</title>
121

    
122
      <cmdsynopsis>
123
        <command>copyfile</command>
124
        <arg>-n <replaceable>node</replaceable></arg>
125
        <arg choice="req"><replaceable>file</replaceable></arg>
126
      </cmdsynopsis>
127

    
128
      <para>
129
        Copies a file to all or to some nodes. The argument specifies
130
        the source file (on the current system), the
131
        <option>-n</option> argument specifies the target node, or
132
        nodes if the option is given multiple times. If
133
        <option>-n</option> is not given at all, the file will be
134
        copied to all nodes.
135

    
136
        Example:
137
        <screen>
138
          # gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test
139
        </screen>
140

    
141
        This will copy the file <filename>/tmp/test</filename> from
142
        the current node to the two named nodes.
143
      </para>
144
    </refsect2>
145

    
146
    <refsect2>
147
      <title>DESTROY</title>
148

    
149
      <cmdsynopsis>
150
        <command>destroy</command>
151
      </cmdsynopsis>
152

    
153
      <para>
154
        Remove all configuration files related to the cluster, so that
155
        a <command>gnt-cluster init</command> can be done again
156
        afterwards.
157
      </para>
158
    </refsect2>
159

    
160
    <refsect2>
161
      <title>GETMASTER</title>
162

    
163
      <cmdsynopsis>
164
        <command>getmaster</command>
165
      </cmdsynopsis>
166

    
167
      <para>
168
        Displays the current master node.
169
      </para>
170
    </refsect2>
171

    
172
    <refsect2>
173
      <title>INFO</title>
174

    
175
      <cmdsynopsis>
176
        <command>info</command>
177
      </cmdsynopsis>
178

    
179
      <para>
180
        Shows runtime cluster information: cluster name, architecture
181
        (32 or 64 bit), master node, node list and instance list.
182
      </para>
183
    </refsect2>
184

    
185
    <refsect2>
186
      <title>INIT</title>
187

    
188
      <cmdsynopsis>
189
        <command>init</command>
190
        <arg>-s <replaceable>secondary_ip</replaceable></arg>
191
        <arg>-b <replaceable>bridge</replaceable></arg>
192
        <arg choice="req"><replaceable>clustername</replaceable></arg>
193
      </cmdsynopsis>
194

    
195
      <para>
196
        This commands is only run once initially on the first node of
197
        the cluster. It will initialize the cluster configuration and
198
        setup ssh-keys and more.
199
      </para>
200

    
201
      <para>
202
        Note that the <replaceable>clustername</replaceable> is not
203
        any random name. It has to be resolvable to an IP address
204
        using DNS, and it is best if you give the fully-qualified
205
        domain name.
206
      </para>
207

    
208
      <para>
209
        The cluster can run in two modes: single-home or
210
        dual-homed. In the first case, all traffic (both public
211
        traffic, inter-node traffic and data replication traffic) goes
212
        over the same interface. In the dual-homed case, the data
213
        replication traffic goes over the second network. The
214
        <option>-s</option> option here marks the cluster as
215
        dual-homed and its parameter represents this node's address on
216
        the second network. If you initialise the cluster with
217
        <option>-s</option>, all nodes added must have a secondary IP
218
        as well.
219
      </para>
220

    
221
      <para>
222
        Note that for Ganeti it doesn't matter if the secondary
223

    
224
        network is actually a separate physical network, or is done
225
        using tunneling, etc. For performance reasons, it's
226
        recommended to use a separate network, of course.
227
      </para>
228

    
229
      <para>
230
        The <option>-b</option> option specifies the default bridge
231
        for instances.
232
      </para>
233
    </refsect2>
234

    
235
    <refsect2>
236
      <title>LIST-TAGS</title>
237

    
238
      <cmdsynopsis>
239
        <command>list-tags</command>
240
      </cmdsynopsis>
241

    
242
      <para>List the tags of the cluster.</para>
243
    </refsect2>
244

    
245
    <refsect2>
246
      <title>MASTERFAILOVER</title>
247

    
248
      <cmdsynopsis>
249
        <command>masterfailover</command>
250
      </cmdsynopsis>
251

    
252
      <para>
253
        Failover the master role to the current node.
254
      </para>
255
    </refsect2>
256

    
257
    <refsect2>
258
      <title>REMOVE-TAGS</title>
259

    
260
      <cmdsynopsis>
261
        <command>remove-tags</command>
262
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
263
        <arg choice="req"
264
        rep="repeat"><replaceable>tag</replaceable></arg>
265
      </cmdsynopsis>
266

    
267
      <para>
268
        Remove tags from the cluster. If any of the tags are not
269
        existing on the cluster, the entire operation will abort.
270
      </para>
271

    
272
      <para>
273
        If the <option>--from</option> option is given, the list of
274
        tags will be extended with the contents of that file (each
275
        line becomes a tag). In this case, there is not need to pass
276
        tags on the command line (if you do, both sources will be
277
        used). A file name of - will be interpreted as stdin.
278
      </para>
279
    </refsect2>
280

    
281
    <refsect2>
282
      <title>RENAME</title>
283

    
284
      <cmdsynopsis>
285
        <command>rename</command>
286
        <arg>-f</arg>
287
        <arg choice="req"><replaceable>name</replaceable></arg>
288
      </cmdsynopsis>
289

    
290
      <para>
291
        Renames the cluster and in the process updates the master IP
292
        address to the one the new name resolves to. At least one of
293
        either the name or the IP address must be different, otherwise
294
        the operation will be aborted.
295
      </para>
296

    
297
      <para>
298
        Note that since this command can be dangerous (especially when
299
        run over SSH), the command will require confirmation unless
300
        run with the <option>-f</option> option.
301
      </para>
302
    </refsect2>
303

    
304
    <refsect2>
305
      <title>SEARCH-TAGS</title>
306

    
307
      <cmdsynopsis>
308
        <command>search-tags</command>
309
        <arg choice="req"><replaceable>pattern</replaceable></arg>
310
      </cmdsynopsis>
311

    
312
      <para>
313
        Searches the tags on all objects in the cluster (the cluster
314
        itself, the nodes and the instances) for a given pattern. The
315
        pattern is interpreted as a regular expression and a search
316
        will be done on it (i.e. the given pattern is not anchored to
317
        the beggining of the string; if you want that, prefix the
318
        pattern with <literal>^</literal>).
319
      </para>
320

    
321
      <para>
322
        If no tags are matching the pattern, the exit code of the
323
        command will be one. If there is at least one match, the exit
324
        code will be zero. Each match is listed on one line, the
325
        object and the tag separated by a space. The cluster will be
326
        listed as <filename>/cluster</filename>, a node will be listed
327
        as
328
        <filename>/nodes/<replaceable>name</replaceable></filename>,
329
        and an instance as
330
        <filename>/instances/<replaceable>name</replaceable></filename>.
331
        Example:
332
      </para>
333
<screen>
334
# gnt-cluster search time
335
/cluster ctime:2007-09-01
336
/nodes/node1.example.com mtime:2007-10-04
337
</screen>
338
    </refsect2>
339

    
340
    <refsect2>
341
      <title>VERIFY</title>
342

    
343
      <cmdsynopsis>
344
        <command>verify</command>
345
      </cmdsynopsis>
346

    
347
      <para>
348
        Verify correctness of cluster configuration. This is safe with
349
        respect to running instances, and incurs no downtime of the
350
        instances.
351
      </para>
352
    </refsect2>
353

    
354
    <refsect2>
355
      <title>VERSION</title>
356

    
357
      <cmdsynopsis>
358
        <command>version</command>
359
      </cmdsynopsis>
360

    
361
      <para>
362
        Show the cluster version.
363
      </para>
364
    </refsect2>
365

    
366
  </refsect1>
367

    
368
  &footer;
369

    
370
</refentry>
371

    
372
<!-- Keep this comment at the end of the file
373
Local variables:
374
mode: sgml
375
sgml-omittag:t
376
sgml-shorttag:t
377
sgml-minimize-attributes:nil
378
sgml-always-quote-attributes:t
379
sgml-indent-step:2
380
sgml-indent-data:t
381
sgml-parent-document:nil
382
sgml-default-dtd-file:nil
383
sgml-exposed-tags:nil
384
sgml-local-catalogs:nil
385
sgml-local-ecat-files:nil
386
End:
387
-->