Undo damage done by d8d37493478a26c5f1809a5f3df89ffd6e149281
authorMartin Schwenke <martin@meltin.net>
Thu, 22 Mar 2012 04:27:25 +0000 (15:27 +1100)
committerMichael Adam <obnox@samba.org>
Fri, 6 Jun 2014 13:00:36 +0000 (15:00 +0200)
The implementation of DisableIPFailover got intermingled with
--nopublicipcheck.  This just looks wrong - Ronnie must have been
having a bad day.  :-)

Signed-off-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 5083b266dd68b292c4275505f3d1b878dbf12f11)

Conflicts:

include/ctdb_private.h

include/ctdb_private.h
server/ctdb_recoverd.c
server/ctdbd.c

index 74a1e3a94eac28215a7802bec38896eab8298db8..3b1500790effa060ee7e33ecf0d4ab625980a676 100644 (file)
@@ -443,7 +443,8 @@ struct ctdb_context {
        uint32_t recovery_master;
        struct ctdb_call_state *pending_calls;
        struct ctdb_client_ip *client_ip_list;
-       struct trbt_tree *server_ids;   
+       bool do_checkpublicip;
+       struct trbt_tree *server_ids;
        const char *event_script_dir;
        const char *notification_script;
        const char *default_public_interface;
index d4232e001924568b516a873f97c1e2302350c9d6..bc7a7ae23a4695eeeb5a08ff2a7d1770debfe005 100644 (file)
@@ -1287,7 +1287,7 @@ static int ctdb_reload_remote_public_ips(struct ctdb_context *ctdb,
                        return -1;
                }
 
-               if (ctdb->tunable.disable_ip_failover == 0) {
+               if (ctdb->do_checkpublicip) {
                        if (rec->ip_check_disable_ctx == NULL) {
                                if (verify_remote_ip_allocation(ctdb, ctdb->nodes[j]->known_public_ips)) {
                                        DEBUG(DEBUG_ERR,("Node %d has inconsistent public ip allocation and needs update.\n", ctdb->nodes[j]->pnn));
index 1d5a457eb1572e6b49f0645519ab2cd330905323..54582476bb43e7aa69ee1f0b98ff42a701a0a6dc 100644 (file)
@@ -203,8 +203,6 @@ int main(int argc, const char *argv[])
 
        ctdb_tunables_set_defaults(ctdb);
 
-       ctdb->tunable.disable_ip_failover = options.no_publicipcheck;
-
        ret = ctdb_set_recovery_lock_file(ctdb, options.recovery_lock_file);
        if (ret == -1) {
                DEBUG(DEBUG_ALERT,("ctdb_set_recovery_lock_file failed - %s\n", ctdb_errstr(ctdb)));
@@ -320,6 +318,8 @@ int main(int argc, const char *argv[])
 
        ctdb->valgrinding = options.valgrinding;
 
+       ctdb->do_checkpublicip = !options.no_publicipcheck;
+
        if (options.max_persistent_check_errors < 0) {
                ctdb->max_persistent_check_errors = 0xFFFFFFFFFFFFFFFFLL;
        } else {