Undo damage done by d8d37493478a26c5f1809a5f3df89ffd6e149281
authorMartin Schwenke <martin@meltin.net>
Thu, 22 Mar 2012 04:27:25 +0000 (15:27 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 22 Mar 2012 04:34:52 +0000 (15:34 +1100)
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>
include/ctdb_private.h
server/ctdb_recoverd.c
server/ctdbd.c

index 3d5751b980851684bfa49cdb3091c56017ab2415..657bb62bc69a6f0d2784e8a40378729927b596a2 100644 (file)
@@ -453,6 +453,7 @@ struct ctdb_context {
        uint32_t recovery_master;
        struct ctdb_call_state *pending_calls;
        struct ctdb_client_ip *client_ip_list;
+       bool do_checkpublicip;
        struct trbt_tree *server_ids; 
        bool do_setsched;
        void *saved_scheduler_param;
index 642679b4ad157f25e33783cc9c4b9d20c6a1162d..97e46704b1f1a54bcfa7df4c40927e25b722805d 100644 (file)
@@ -1406,7 +1406,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 a8d956d8658d0b836ccf198b3e56891c805349e8..4205bd227b0fb6d4ac286ae7e32ed58585f35811 100644 (file)
@@ -209,8 +209,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)));
@@ -323,6 +321,8 @@ int main(int argc, const char *argv[])
                ctdb->do_setsched = 1;
        }
 
+       ctdb->do_checkpublicip = !options.no_publicipcheck;
+
        if (options.max_persistent_check_errors < 0) {
                ctdb->max_persistent_check_errors = 0xFFFFFFFFFFFFFFFFLL;
        } else {