Statistics
| Branch: | Tag: | Revision:

root / man / ganeti-masterd.rst @ 77ecfa82

History | View | Annotate | Download (2.7 kB)

1 4e53d886 Iustin Pop
ganeti-masterd(8) Ganeti | Version @GANETI_VERSION@
2 4e53d886 Iustin Pop
===================================================
3 4e53d886 Iustin Pop
4 4e53d886 Iustin Pop
Name
5 4e53d886 Iustin Pop
----
6 4e53d886 Iustin Pop
7 4e53d886 Iustin Pop
ganeti-masterd - Ganeti master daemon
8 4e53d886 Iustin Pop
9 4e53d886 Iustin Pop
Synopsis
10 4e53d886 Iustin Pop
--------
11 4e53d886 Iustin Pop
12 4e53d886 Iustin Pop
**ganeti-masterd** [-f] [-d] [--no-voting]
13 4e53d886 Iustin Pop
14 4e53d886 Iustin Pop
DESCRIPTION
15 4e53d886 Iustin Pop
-----------
16 4e53d886 Iustin Pop
17 4e53d886 Iustin Pop
The **ganeti-masterd** is the daemon which is responsible for the
18 4e53d886 Iustin Pop
overall cluster coordination. Without it, no change can be
19 4e53d886 Iustin Pop
performed on the cluster.
20 4e53d886 Iustin Pop
21 4e53d886 Iustin Pop
For testing purposes, you can give the ``-f`` option and the
22 4e53d886 Iustin Pop
program won't detach from the running terminal.
23 4e53d886 Iustin Pop
24 4e53d886 Iustin Pop
Debug-level message can be activated by giving the ``-d`` option.
25 4e53d886 Iustin Pop
26 4e53d886 Iustin Pop
ROLE
27 4e53d886 Iustin Pop
~~~~
28 4e53d886 Iustin Pop
29 4e53d886 Iustin Pop
The role of the master daemon is to coordinate all the actions that
30 4e53d886 Iustin Pop
change the state of the cluster. Things like accepting new jobs,
31 4e53d886 Iustin Pop
coordinating the changes on nodes (via RPC calls to the respective
32 4e53d886 Iustin Pop
node daemons), maintaining the configuration and so on are done via
33 4e53d886 Iustin Pop
this daemon.
34 4e53d886 Iustin Pop
35 4e53d886 Iustin Pop
The only action that can be done without the master daemon is the
36 4e53d886 Iustin Pop
failover of the master role to another node in the cluster, via the
37 4e53d886 Iustin Pop
**gnt-cluster master-failover** command.
38 4e53d886 Iustin Pop
39 4e53d886 Iustin Pop
If the master daemon is stopped, the instances are not affected,
40 4e53d886 Iustin Pop
but they won't be restarted automatically in case of failure.
41 4e53d886 Iustin Pop
42 4e53d886 Iustin Pop
STARTUP
43 4e53d886 Iustin Pop
~~~~~~~
44 4e53d886 Iustin Pop
45 4e53d886 Iustin Pop
At startup, the master daemon will confirm with the node daemons
46 4e53d886 Iustin Pop
that the node it is running is indeed the master node of the
47 4e53d886 Iustin Pop
cluster. It will abort if it doesn't get half plus one positive
48 4e53d886 Iustin Pop
answers (offline nodes are queried too, just in case our
49 4e53d886 Iustin Pop
configuration is stale).
50 4e53d886 Iustin Pop
51 4e53d886 Iustin Pop
For small clusters with a number of nodes down, and especially for
52 4e53d886 Iustin Pop
two-node clusters where the other has gone done, this creates a
53 4e53d886 Iustin Pop
problem. In this case the ``--no-voting`` option can be used to
54 4e53d886 Iustin Pop
skip this process. The option requires interactive confirmation, as
55 4e53d886 Iustin Pop
having two masters on the same cluster is a very dangerous
56 4e53d886 Iustin Pop
situation and will most likely lead to data loss.
57 4e53d886 Iustin Pop
58 4e53d886 Iustin Pop
JOB QUEUE
59 4e53d886 Iustin Pop
~~~~~~~~~
60 4e53d886 Iustin Pop
61 4e53d886 Iustin Pop
The master daemon maintains a job queue (located under the directory
62 4e53d886 Iustin Pop
``@LOCALSTATEDIR@/lib/ganeti/queue``) in which all current jobs are
63 4e53d886 Iustin Pop
stored, one job per file serialized in JSON format; in this directory
64 4e53d886 Iustin Pop
a subdirectory called ``archive`` holds archived job files.
65 4e53d886 Iustin Pop
66 4e53d886 Iustin Pop
The moving of jobs from the current to the queue directory is done
67 4e53d886 Iustin Pop
via a request to the master; this can be accomplished from the
68 4e53d886 Iustin Pop
command line with the **gnt-job archive** or
69 4e53d886 Iustin Pop
**gnt-job autoarchive** commands. In case of problems with the
70 4e53d886 Iustin Pop
master, a job file can simply be moved away or deleted (but this
71 4e53d886 Iustin Pop
might leave the cluster inconsistent).
72 4e53d886 Iustin Pop
73 4e53d886 Iustin Pop
COMMUNICATION PROTOCOL
74 4e53d886 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~
75 4e53d886 Iustin Pop
76 4e53d886 Iustin Pop
The master accepts commands over a Unix socket, using JSON
77 4e53d886 Iustin Pop
serialized messages separated by a specific byte sequence. For more
78 4e53d886 Iustin Pop
details, see the design documentation supplied with Ganeti.
79 9ff4f2c0 Michael Hanselmann
80 9ff4f2c0 Michael Hanselmann
.. vim: set textwidth=72 :
81 9ff4f2c0 Michael Hanselmann
.. Local Variables:
82 9ff4f2c0 Michael Hanselmann
.. mode: rst
83 9ff4f2c0 Michael Hanselmann
.. fill-column: 72
84 9ff4f2c0 Michael Hanselmann
.. End: