59acece321b487a89f6e19c81471a283836cd0ae
[metze/samba/wip.git] / ctdb / doc / ctdb-etcd.7.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry
3         PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4         "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5 <refentry id="ctdb-etcd.7">
6
7   <refentryinfo>
8     <author>
9       <contrib>
10         This documentation was written by
11         Jose A. Rivera
12       </contrib>
13     </author>
14
15     <copyright>
16       <year>2016</year>
17       <holder>Jose A. Rivera</holder>
18     </copyright>
19     <legalnotice>
20       <para>
21         This program is free software; you can redistribute it and/or
22         modify it under the terms of the GNU General Public License as
23         published by the Free Software Foundation; either version 3 of
24         the License, or (at your option) any later version.
25       </para>
26       <para>
27         This program is distributed in the hope that it will be
28         useful, but WITHOUT ANY WARRANTY; without even the implied
29         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
30         PURPOSE.  See the GNU General Public License for more details.
31       </para>
32       <para>
33         You should have received a copy of the GNU General Public
34         License along with this program; if not, see
35         <ulink url="http://www.gnu.org/licenses"/>.
36       </para>
37     </legalnotice>
38   </refentryinfo>
39
40   <refmeta>
41     <refentrytitle>ctdb-etcd</refentrytitle>
42     <manvolnum>7</manvolnum>
43     <refmiscinfo class="source">ctdb</refmiscinfo>
44     <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
45   </refmeta>
46
47   <refnamediv>
48     <refname>ctdb-etcd</refname>
49     <refpurpose>CTDB etcd integration</refpurpose>
50   </refnamediv>
51
52   <refsynopsisdiv>
53     <cmdsynopsis>
54       <command>ctdb_etcd_lock</command>
55     </cmdsynopsis>
56   </refsynopsisdiv>
57
58   <refsect1>
59     <title>DESCRIPTION</title>
60     <para>
61       ctdb_etcd_lock is intended to be run as a mutex helper for CTDB. It
62       will try to connect to an existing etcd cluster and grab a lock in that
63       cluster to function as CTDB's recovery lock. Please see
64       <emphasis>ctdb/doc/cluster_mutex_helper.txt</emphasis> for details on
65       the mutex helper API. To use this, include the following line in your
66       CTDB config file:
67     </para>
68     <screen format="linespecific">
69 CTDB_RECOVERY_LOCK="!/usr/local/usr/libexec/ctdb/ctdb_etcd_lock"
70     </screen>
71     <para>
72       You can also pass "-v", "-vv", or "-vvv" to include verbose output in
73       the CTDB log. Additional "v"s indicate increases in verbosity.
74     </para>
75     <para>
76       This mutex helper expects the system Python interpreter to have access
77       to the etcd Python module. It also expects an etcd cluster to be
78       configured and running. To integrate with this, there is an optional
79       config file of the following format:
80     </para>
81     <screen format="linespecific">
82 key = value
83     </screen>
84     <para>
85       The following configuration parameters (and their defaults) are defined
86       for use by ctdb_etcd_lock:
87     </para>
88     <screen format="linespecific">
89 port      = 2379   # connecting port for the etcd cluster
90 lock_ttl  = 9      # seconds for TTL
91 refresh   = 2      # seconds between attempts to maintain lock
92 locks_dir = _ctdb  # where to store CTDB locks in etcd
93                    # The final etcd directory for any given lock looks like:
94                    #   /_locks/{locks_dir}/{netbios name}/
95     </screen>
96     <para>
97       In addition, any keyword parameter that can be used to configure an
98       etcd client may be specified and modified here. For more documentation
99       on these parameters, see here: https://github.com/jplana/python-etcd/
100     </para>
101   </refsect1>
102
103   <refsect1>
104     <title>SEE ALSO</title>
105     <para>
106       <citerefentry><refentrytitle>ctdb</refentrytitle>
107       <manvolnum>7</manvolnum></citerefentry>,
108
109       <citerefentry><refentrytitle>ctdbd</refentrytitle>
110       <manvolnum>1</manvolnum></citerefentry>,
111
112       <ulink url="http://ctdb.samba.org/"/>
113     </para>
114   </refsect1>
115
116
117 </refentry>