summaryrefslogtreecommitdiffstats
path: root/ctdb/doc/ctdb-etcd.7.xml
blob: af343dbaa57014d2aafea4cbb8b77af07e6c6e80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry
	PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
	"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<refentry id="ctdb-etcd.7">

  <refentryinfo>
    <author>
      <contrib>
	This documentation was written by
	Jose A. Rivera
      </contrib>
    </author>

    <copyright>
      <year>2016</year>
      <holder>Jose A. Rivera</holder>
    </copyright>
    <legalnotice>
      <para>
	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License as
	published by the Free Software Foundation; either version 3 of
	the License, or (at your option) any later version.
      </para>
      <para>
	This program is distributed in the hope that it will be
	useful, but WITHOUT ANY WARRANTY; without even the implied
	warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
	PURPOSE.  See the GNU General Public License for more details.
      </para>
      <para>
	You should have received a copy of the GNU General Public
	License along with this program; if not, see
	<ulink url="http://www.gnu.org/licenses"/>.
      </para>
    </legalnotice>
  </refentryinfo>

  <refmeta>
    <refentrytitle>ctdb-etcd</refentrytitle>
    <manvolnum>7</manvolnum>
    <refmiscinfo class="source">ctdb</refmiscinfo>
    <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>ctdb-etcd</refname>
    <refpurpose>CTDB etcd integration</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>ctdb_etcd_lock</command>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>DESCRIPTION</title>
    <para>
      ctdb_etcd_lock is intended to be run as a mutex helper for CTDB. It
      will try to connect to an existing etcd cluster and grab a lock in that
      cluster to function as CTDB's cluster lock. Please see
      <emphasis>ctdb/doc/cluster_mutex_helper.txt</emphasis> for details on
      the mutex helper API. To use this, include the following line in
      the <literal>[cluster]</literal> section of
      <citerefentry><refentrytitle>ctdb.conf</refentrytitle>
      <manvolnum>5</manvolnum></citerefentry>:
    </para>
    <screen format="linespecific">
cluster lock = !/usr/local/usr/libexec/ctdb/ctdb_etcd_lock
    </screen>
    <para>
      You can also pass "-v", "-vv", or "-vvv" to include verbose output in
      the CTDB log. Additional "v"s indicate increases in verbosity.
    </para>
    <para>
      This mutex helper expects the system Python interpreter to have access
      to the etcd Python module. It also expects an etcd cluster to be
      configured and running. To integrate with this, there is an optional
      config file of the following format:
    </para>
    <screen format="linespecific">
key = value
    </screen>
    <para>
      The following configuration parameters (and their defaults) are defined
      for use by ctdb_etcd_lock:
    </para>
    <screen format="linespecific">
port      = 2379   # connecting port for the etcd cluster
lock_ttl  = 9      # seconds for TTL
refresh   = 2      # seconds between attempts to maintain lock
locks_dir = _ctdb  # where to store CTDB locks in etcd
                   # The final etcd directory for any given lock looks like:
                   #   /_locks/{locks_dir}/{netbios name}/
    </screen>
    <para>
      In addition, any keyword parameter that can be used to configure an
      etcd client may be specified and modified here. For more documentation
      on these parameters, see here: https://github.com/jplana/python-etcd/
    </para>
  </refsect1>

  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <citerefentry><refentrytitle>ctdb</refentrytitle>
      <manvolnum>7</manvolnum></citerefentry>,

      <citerefentry><refentrytitle>ctdbd</refentrytitle>
      <manvolnum>1</manvolnum></citerefentry>,

      <ulink url="http://ctdb.samba.org/"/>
    </para>
  </refsect1>


</refentry>