Use the "failover:disabled" option instead.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
offsetof(struct ctdb_tunable_list, reclock_ping_period) },
{ "NoIPFailback", 0, false,
offsetof(struct ctdb_tunable_list, no_ip_failback) },
- { "DisableIPFailover", 0, false,
+ { "DisableIPFailover", 0, true,
offsetof(struct ctdb_tunable_list, disable_ip_failover) },
{ "VerboseMemoryNames", 0, false,
offsetof(struct ctdb_tunable_list, verbose_memory_names) },
</para>
</refsect2>
- <refsect2>
- <title>DisableIPFailover</title>
- <para>Default: 0</para>
- <para>
- When set to non-zero, ctdb will not perform failover or
- failback. Even if a node fails while holding public IPs, ctdb
- will not recover the IPs or assign them to another node.
- </para>
- <para>
- When this tunable is enabled, ctdb will no longer attempt
- to recover the cluster by failing IP addresses over to other
- nodes. This leads to a service outage until the administrator
- has manually performed IP failover to replacement nodes using the
- 'ctdb moveip' command.
- </para>
- </refsect2>
-
<refsect2>
<title>ElectionTimeout</title>
<para>Default: 3</para>
RerecoveryTimeout = 10
EnableBans = 1
NoIPFailback = 0
-DisableIPFailover = 0
VerboseMemoryNames = 0
RecdPingTimeout = 60
RecdFailCount = 10
</variablelist>
</refsect1>
+ <refsect1>
+ <title>
+ FAILOVER CONFIGURATION
+ </title>
+
+ <para>
+ Options in this section affect CTDB failover. They are
+ valid within the <emphasis>failover</emphasis> section of file,
+ indicated by <literal>[failover]</literal>.
+ </para>
+
+ <variablelist>
+
+ <varlistentry>
+ <term>disabled = true|false</term>
+ <listitem>
+ <para>
+ If set to <literal>true</literal> then public IP failover
+ is disabled.
+ </para>
+ <para>
+ Default: <literal>false</literal>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </refsect1>
+
<refsect1>
<title>
LEGACY CONFIGURATION
#include "cluster/cluster_conf.h"
#include "database/database_conf.h"
#include "event/event_conf.h"
+#include "failover/failover_conf.h"
#include "legacy_conf.h"
#include "ctdb_config.h"
EVENT_CONF_DEBUG_SCRIPT,
&ctdb_config.event_debug_script);
+ /*
+ * Failover
+ */
+ conf_assign_boolean_pointer(conf,
+ FAILOVER_CONF_SECTION,
+ FAILOVER_CONF_DISABLED,
+ &ctdb_config.failover_disabled);
+
/*
* Legacy
*/
cluster_conf_init(conf);
database_conf_init(conf);
event_conf_init(conf);
+ failover_conf_init(conf);
legacy_conf_init(conf);
setup_config_pointers(conf);
/* Event */
const char *event_debug_script;
+ /* Failover */
+ bool failover_disabled;
+
/* Legacy */
bool realtime_scheduling;
bool recmaster_capability;
#include "common/common.h"
#include "common/logging.h"
+#include "server/ctdb_config.h"
+
#include "ctdb_cluster_mutex.h"
/* List of SRVID requests that need to be processed */
}
}
- if (rec->ctdb->tunable.disable_ip_failover != 0) {
+ if (ctdb_config.failover_disabled) {
ret = setenv("CTDB_DISABLE_IP_FAILOVER", "1", 1);
if (ret != 0) {
D_ERR("Failed to set CTDB_DISABLE_IP_FAILOVER variable\n");
}
/* Return early if disabled... */
- if (ctdb->tunable.disable_ip_failover != 0 ||
+ if (ctdb_config.failover_disabled ||
ctdb_op_is_disabled(rec->takeover_run)) {
return 0;
}
#include "common/common.h"
#include "common/logging.h"
+#include "server/ctdb_config.h"
+
#include "server/ipalloc.h"
#define TAKEOVER_TIMEOUT() timeval_current_ofs(ctdb->tunable.takeover_timeout,0)
return 0;
}
- if (ctdb->tunable.disable_ip_failover == 0 && ctdb->do_checkpublicip) {
+ if (ctdb_config.failover_disabled == 0 && ctdb->do_checkpublicip) {
have_ip = ctdb_sys_have_ip(&pip->addr);
}
best_iface = ctdb_vnn_best_iface(ctdb, vnn);
ctdb_ban_self(ctdb);
}
- if (ctdb->tunable.disable_ip_failover == 0 && ctdb->do_checkpublicip) {
+ if (ctdb_config.failover_disabled == 0 && ctdb->do_checkpublicip) {
if (ctdb_sys_have_ip(state->addr)) {
DEBUG(DEBUG_ERR,
("IP %s still hosted during release IP callback, failing\n",
* local node. Redundant releases need to update the PNN but
* are otherwise ignored.
*/
- if (ctdb->tunable.disable_ip_failover == 0 && ctdb->do_checkpublicip) {
+ if (ctdb_config.failover_disabled == 0 && ctdb->do_checkpublicip) {
if (!ctdb_sys_have_ip(&pip->addr)) {
DEBUG(DEBUG_DEBUG,("Redundant release of IP %s/%u on interface %s (ip not held)\n",
ctdb_addr_to_str(&pip->addr),
struct ctdb_vnn *vnn, *next;
int count = 0;
- if (ctdb->tunable.disable_ip_failover == 1) {
+ if (ctdb_config.failover_disabled == 1) {
return;
}
RerecoveryTimeout = 10
EnableBans = 1
NoIPFailback = 0
-DisableIPFailover = 0
VerboseMemoryNames = 0
RecdPingTimeout = 60
RecdFailCount = 10
ctdb-cluster-conf
ctdb-database-conf
ctdb-event-conf
+ ctdb-failover-conf
ctdb-legacy-conf
ctdb-event-protocol
talloc tevent tdb-wrap tdb talloc_report''' +