root / README.admin @ 5039a44f
History | View | Annotate | Download (2.9 kB)
1 | 03353341 | Vangelis Koukis | README.admin - Administration notes |
---|---|---|---|
2 | 03353341 | Vangelis Koukis | |
3 | 03353341 | Vangelis Koukis | This file contains notes related to administration of a working Synnefo |
4 | 03353341 | Vangelis Koukis | deployment. This document should be read *after* README.deploy, which contains |
5 | 03353341 | Vangelis Koukis | step-by-step Synnefo deployment instructions. |
6 | 03353341 | Vangelis Koukis | |
7 | 03353341 | Vangelis Koukis | |
8 | 96b635d9 | Vangelis Koukis | Database |
9 | 96b635d9 | Vangelis Koukis | ======== |
10 | 96b635d9 | Vangelis Koukis | |
11 | 96b635d9 | Vangelis Koukis | MySQL: manage.py dbshell seems to ignore the setting of 'init_command' |
12 | 96b635d9 | Vangelis Koukis | in settings.DATABASES |
13 | 96b635d9 | Vangelis Koukis | |
14 | 03353341 | Vangelis Koukis | Reconciliation mechanism |
15 | 03353341 | Vangelis Koukis | ======================== |
16 | 03353341 | Vangelis Koukis | |
17 | 03353341 | Vangelis Koukis | On certain occasions, such as a Ganeti or RabbitMQ failure, the VM state in the |
18 | 03353341 | Vangelis Koukis | system's database may differ from that in the Ganeti installation. The |
19 | 03353341 | Vangelis Koukis | reconciliation process is designed to bring the system's database in sync with |
20 | 03353341 | Vangelis Koukis | what Ganeti knows about each VM. |
21 | 03353341 | Vangelis Koukis | |
22 | 03353341 | Vangelis Koukis | The administrator can trigger reconciliation manually, by issuing a Ganeti |
23 | 03353341 | Vangelis Koukis | OP_INSTANCE_QUERY_DATA command, using gnt-instance info. |
24 | 03353341 | Vangelis Koukis | |
25 | 271baf11 | Nikos Skalkotos | Alternatively, the reconciliation process can be triggered for all VMs using the |
26 | 271baf11 | Nikos Skalkotos | command |
27 | 03353341 | Vangelis Koukis | |
28 | 03353341 | Vangelis Koukis | ./manage.py reconcile --all |
29 | 03353341 | Vangelis Koukis | |
30 | 03353341 | Vangelis Koukis | It is advised, though not strictly necessary, to run the reconciliation process |
31 | 271baf11 | Nikos Skalkotos | periodically, through cron. To avoid overloading the Ganeti master, the periodic |
32 | 271baf11 | Nikos Skalkotos | reconciliation process takes a staggered approach to updating the VMs, which is |
33 | 271baf11 | Nikos Skalkotos | configured through the following parameters: |
34 | 03353341 | Vangelis Koukis | |
35 | 271baf11 | Nikos Skalkotos | * The settings.py RECONCILIATION_MIN parameter, which specifies the maximum time |
36 | 271baf11 | Nikos Skalkotos | a VM can remain ``non-reconciled''. (default: 30 mins) |
37 | 03353341 | Vangelis Koukis | |
38 | 271baf11 | Nikos Skalkotos | * The --interval option to the reconcile command, which declares the interval |
39 | 271baf11 | Nikos Skalkotos | time between reconciliation attempts (default: 1 min) |
40 | 03353341 | Vangelis Koukis | |
41 | 03353341 | Vangelis Koukis | On each invocation of the reconcile command, the system will trigger a |
42 | 271baf11 | Nikos Skalkotos | reconciliation for ((num_all_vms/RECONCILIATION_MIN) * interval) machines. |
43 | 271baf11 | Nikos Skalkotos | Obviously the lower the interval value and the higher the setting of |
44 | 271baf11 | Nikos Skalkotos | RECONCILIATION_MIN, the less load is going to be put on Ganeti. |
45 | 03353341 | Vangelis Koukis | |
46 | 3a4e3bac | Georgios Gousios | Logging |
47 | 3a4e3bac | Georgios Gousios | ======= |
48 | 3a4e3bac | Georgios Gousios | |
49 | 3a4e3bac | Georgios Gousios | Logging in Synnefo is using Python's logging module. The module is configured |
50 | 3a4e3bac | Georgios Gousios | using a configuration file, whose format is described here: |
51 | 3a4e3bac | Georgios Gousios | |
52 | 3a4e3bac | Georgios Gousios | http://docs.python.org/library/logging.config.html |
53 | 3a4e3bac | Georgios Gousios | |
54 | 3a4e3bac | Georgios Gousios | By default, the log initialization code will look for the logging.conf file |
55 | 3a4e3bac | Georgios Gousios | in the following locations in order: |
56 | 3a4e3bac | Georgios Gousios | |
57 | 3a4e3bac | Georgios Gousios | 1. /etc/synnefo/logging.conf |
58 | 3a4e3bac | Georgios Gousios | 2. os.getcwd()/logging.conf |
59 | 3a4e3bac | Georgios Gousios | 3. synnefo.logic.__path__[0]/logging.conf (<-- this is the default) |
60 | 3a4e3bac | Georgios Gousios | |
61 | 3a4e3bac | Georgios Gousios | The default configuration is using Linux conventions: it logs to /dev/log for |
62 | 3a4e3bac | Georgios Gousios | all loggers. The default configuration can be changed by copying the default |
63 | 3a4e3bac | Georgios Gousios | file to any of the above mentioned locations and changing it appropriately. |
64 | 3a4e3bac | Georgios Gousios | |
65 | 3a4e3bac | Georgios Gousios | * Logging and demonization: If the logging is configured to print to the console |
66 | 3a4e3bac | Georgios Gousios | (using the consoleHandler handler) then daemon processes (notably, the |
67 | 3a4e3bac | Georgios Gousios | dispatcher) will not work as it should. This only happens after the daemon |
68 | 3a4e3bac | Georgios Gousios | has lost its controlling terminal (e.g. because the terminal was closed); |
69 | 3a4e3bac | Georgios Gousios | in this case the dispatcher does not know where to log to and depending on |
70 | 3a4e3bac | Georgios Gousios | the system it either crashes or stalls. This can be avoided if the logging |
71 | 3a4e3bac | Georgios Gousios | module is not configured to output to the console. |