CLUSTER_CONF_RECOVERY_LOCK,
NULL,
validate_recovery_lock);
+ conf_define_boolean(conf,
+ CLUSTER_CONF_SECTION,
+ CLUSTER_CONF_LEADER_CAPABILITY,
+ true,
+ NULL);
}
#define CLUSTER_CONF_NODE_ADDRESS "node address"
#define CLUSTER_CONF_CLUSTER_LOCK "cluster lock"
#define CLUSTER_CONF_RECOVERY_LOCK "recovery lock"
+#define CLUSTER_CONF_LEADER_CAPABILITY "leader capability"
void cluster_conf_init(struct conf_context *conf);
<variablelist>
<varlistentry>
- <term>RECMASTER</term>
+ <term>LEADER</term>
<listitem>
<para>
- Indicates that a node can become the CTDB cluster recovery
- master. The current recovery master is decided via an
+ Indicates that a node can become the CTDB cluster leader.
+ The current leader is decided via an
election held by all active nodes with this capability.
</para>
<para>
</variablelist>
<para>
- The RECMASTER and LMASTER capabilities can be disabled when CTDB
+ The LEADER and LMASTER capabilities can be disabled when CTDB
is used to create a cluster spanning across WAN links. In this
case CTDB acts as a WAN accelerator.
</para>
<screen format="linespecific">
[legacy]
lmaster capability = false
- recmaster capability = false
+ leader capability = false
</screen>
</para>
<para>
Verify with the command "ctdb getcapabilities" that that node no longer
- has the recmaster or the lmaster capabilities.
+ has the leader or the lmaster capabilities.
</para>
</refsect1>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>leader capability = true|false</term>
+ <listitem>
+ <para>
+ Indicates whether a node can become the leader
+ for the cluster. If this is set to
+ <literal>false</literal> then the node will not be able to
+ become the leader for the cluster. This feature
+ is primarily used for making a cluster span across a WAN
+ link and use CTDB as a WAN-accelerator.
+ </para>
+ <para>
+ Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
+ section in
+ <citerefentry><refentrytitle>ctdb</refentrytitle>
+ <manvolnum>7</manvolnum></citerefentry> for more
+ information.
+ </para>
+ <para>
+ Default: <literal>true</literal>
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term>node address = <parameter>IPADDR</parameter></term>
<listitem>
</listitem>
</varlistentry>
- <varlistentry>
- <term>recmaster capability = true|false</term>
- <listitem>
- <para>
- Indicates whether a node can become the recovery master
- for the cluster. If this is set to
- <literal>false</literal> then the node will not be able to
- become the recovery master for the cluster. This feature
- is primarily used for making a cluster span across a WAN
- link and use CTDB as a WAN-accelerator.
- </para>
- <para>
- Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
- section in
- <citerefentry><refentrytitle>ctdb</refentrytitle>
- <manvolnum>7</manvolnum></citerefentry> for more
- information.
- </para>
- <para>
- Default: <literal>true</literal>
- </para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>lmaster capability = true|false</term>
<listitem>
CLUSTER_CONF_SECTION,
CLUSTER_CONF_RECOVERY_LOCK,
&ctdb_config.recovery_lock);
+ conf_assign_boolean_pointer(conf,
+ CLUSTER_CONF_SECTION,
+ CLUSTER_CONF_LEADER_CAPABILITY,
+ &ctdb_config.leader_capability);
/*
* Database
LEGACY_CONF_SECTION,
LEGACY_CONF_REALTIME_SCHEDULING,
&ctdb_config.realtime_scheduling);
- conf_assign_boolean_pointer(conf,
- LEGACY_CONF_SECTION,
- LEGACY_CONF_RECMASTER_CAPABILITY,
- &ctdb_config.recmaster_capability);
conf_assign_boolean_pointer(conf,
LEGACY_CONF_SECTION,
LEGACY_CONF_LMASTER_CAPABILITY,
const char *node_address;
const char *cluster_lock;
const char *recovery_lock;
+ bool leader_capability;
/* Database */
const char *dbdir_volatile;
/* Legacy */
bool realtime_scheduling;
- bool recmaster_capability;
bool lmaster_capability;
bool start_as_stopped;
bool start_as_disabled;
if (!ctdb_config.lmaster_capability) {
ctdb->capabilities &= ~CTDB_CAP_LMASTER;
}
- if (!ctdb_config.recmaster_capability) {
+ if (!ctdb_config.leader_capability) {
ctdb->capabilities &= ~CTDB_CAP_RECMASTER;
}
LEGACY_CONF_REALTIME_SCHEDULING,
true,
NULL);
- conf_define_boolean(conf,
- LEGACY_CONF_SECTION,
- LEGACY_CONF_RECMASTER_CAPABILITY,
- true,
- NULL);
conf_define_boolean(conf,
LEGACY_CONF_SECTION,
LEGACY_CONF_LMASTER_CAPABILITY,
#define LEGACY_CONF_SECTION "legacy"
#define LEGACY_CONF_REALTIME_SCHEDULING "realtime scheduling"
-#define LEGACY_CONF_RECMASTER_CAPABILITY "recmaster capability"
#define LEGACY_CONF_LMASTER_CAPABILITY "lmaster capability"
#define LEGACY_CONF_START_AS_STOPPED "start as stopped"
#define LEGACY_CONF_START_AS_DISABLED "start as disabled"
# node address =
# cluster lock =
# recovery lock =
+ # leader capability = true
[database]
# volatile database directory = ${database_volatile_dbdir}
# persistent database directory = ${database_persistent_dbdir}
# disabled = false
[legacy]
# realtime scheduling = true
- # recmaster capability = true
# lmaster capability = true
# start as stopped = false
# start as disabled = false
EOF
unit_test ctdb-config get "cluster" "cluster lock"
+ok <<EOF
+true
+EOF
+unit_test ctdb-config get "cluster" "leader capability"
+
cat > "$conffile" <<EOF
[cluster]
transport = invalid
Configuration option [cluster] -> recovery lock is deprecated
EOF
unit_test ctdb-config -d WARNING validate
+
+cat > "$conffile" <<EOF
+[cluster]
+ leader capability = false
+EOF
+
+required_result 0 <<EOF
+EOF
+unit_test ctdb-config validate
EOF
unit_test ctdb-config get "legacy" "realtime scheduling"
-ok <<EOF
-true
-EOF
-unit_test ctdb-config get "legacy" "recmaster capability"
-
ok <<EOF
true
EOF