The branch, 1.2 has been updated
       via  6b21c95236a07a656af0e110eb3f9d833aea71dd (commit)
       via  2b572dfa666ce441a1187a9e56718a71d2afd597 (commit)
       via  deacd922d7e229f6e720f234f3c7dee2f8f4ca4a (commit)
       via  e111f943d56e30f14d8dc140a0962bc4835eec47 (commit)
       via  422702a671a5c367a485c63d3cc47d53acab7497 (commit)
       via  f7eedb0f50a8de11c1026894d61b2824d447badb (commit)
       via  241bb26db17af42f40c80560881a226c0ae34cf8 (commit)
       via  9a1276ae1253e2e75bcc6e838c50a2887f4af323 (commit)
       via  c4d5912ea3a4bd732273fe7496570d6e7987d92b (commit)
       via  2fb04a07c62c46edceecdc6d2274f090e49c4dcb (commit)
       via  0c153c9c658b69d454d97d587b9ae2d246fda66d (commit)
       via  62d6836e31012b5015aafb64459b1a7dd2e7aed6 (commit)
       via  226fd1cb8c283bff021151c94111a51c72adc378 (commit)
       via  8d4b2f2d0327795260e022aed846d9e1adb86c6e (commit)
      from  d017164a57e83d0fff0e70ea45bf09115030ac8b (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2


- Log -----------------------------------------------------------------
commit 6b21c95236a07a656af0e110eb3f9d833aea71dd
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Wed Nov 10 14:47:28 2010 +1100

    Dont exit the update ip function if the old and new interfaces are the same
    since if they are the same for whatever reason this triggers the system
    to go into an infinite loop and is unrobust
    
    The scriptds have been changed instead to be able to cope with this
    situation for enhanced robustness
    
    During takeover_run and when merging all ip allocations across the cluster
    try to kepe track of when and which node currently hosts an ip address
    so that we avoid extra ip failovers between nodes

commit 2b572dfa666ce441a1187a9e56718a71d2afd597
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Wed Nov 10 14:46:45 2010 +1100

    change the takeover script timeout to 9 seconds from 5

commit deacd922d7e229f6e720f234f3c7dee2f8f4ca4a
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Wed Nov 10 14:46:05 2010 +1100

    Dont check remote ip allocation if public ip mgmt is disabled

commit e111f943d56e30f14d8dc140a0962bc4835eec47
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Wed Nov 10 14:45:43 2010 +1100

    this stuff is just so fragile  that it will enter infinite recovery and 
fail loops
    on any kind of tiny unexpected error
    
    unconditionally try to remove ip addresses from both old and new interface
    before trying to add it to the new interface to make it less
    fragile

commit 422702a671a5c367a485c63d3cc47d53acab7497
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Wed Nov 10 14:40:43 2010 +1100

    delete from old interface before adding to new interface
    this stops the script from failing with an error if
    both interfaces are specified as the same, which otherwise breaks and leads 
to an infinite recovery loop

commit f7eedb0f50a8de11c1026894d61b2824d447badb
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Wed Nov 10 12:59:25 2010 +1100

    delay loading the public ip address file until after we have started the 
transport and discovered ouw own pnn number

commit 241bb26db17af42f40c80560881a226c0ae34cf8
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Wed Nov 10 12:11:11 2010 +1100

    when we load the public address file,  at the same time check if we are 
already hosting the public address, if so, set ourselves up as the pnn for that 
address

commit 9a1276ae1253e2e75bcc6e838c50a2887f4af323
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Wed Nov 10 12:06:05 2010 +1100

    dont check the public ip assignment or if even we are hosting them and 
shouldnt
    when public ips have been disabled

commit c4d5912ea3a4bd732273fe7496570d6e7987d92b
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Tue Nov 9 15:19:06 2010 +1100

    Add a new tunable : DisableIPFailover that when set to non 0
    will stopp any ip reallocations at all from happening.

commit 2fb04a07c62c46edceecdc6d2274f090e49c4dcb
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Tue Nov 9 12:59:05 2010 +1100

    change the default for how long to waqit before dropping all ips to 120 
seconds

commit 0c153c9c658b69d454d97d587b9ae2d246fda66d
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Tue Nov 9 12:56:02 2010 +1100

    dont delete all ips from the system during the initial "init" event
    leave any ips as they are and let the recovery daemon remove them as 
required

commit 62d6836e31012b5015aafb64459b1a7dd2e7aed6
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Tue Nov 9 12:55:20 2010 +1100

    when creating/adding a public ip, set the initial interface to be the first 
interface specified

commit 226fd1cb8c283bff021151c94111a51c72adc378
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Tue Nov 2 20:11:09 2010 +1100

    New version 1.2.9
    
    * Tue Nov 2 2010 : Version 1.2.9
     - Drop loglevels on several items and remove spam from the messages file
     - Both nfs and nfslock can fail so restart both if there is a problem

commit 8d4b2f2d0327795260e022aed846d9e1adb86c6e
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Thu Oct 28 13:43:57 2010 +1100

    Both nfs and nfslock scripts can fail under redhat in very rare situations.
    Ctdb can also be configured to ignore checking for knfsd and if it is alive.
    In that situation, no attempt will be made to restart nfs, and sicne nfs is 
not running,  lockd can not be restarted either.
    
    To workaround this, everytime we try to restart the lockmanager, also try 
to restart nfsd

-----------------------------------------------------------------------

Summary of changes:
 config/events.d/10.interface |   19 +++----------------
 config/events.d/60.nfs       |    1 +
 include/ctdb_client.h        |    2 +-
 include/ctdb_private.h       |    4 +++-
 packaging/RPM/ctdb.spec.in   |    5 ++++-
 server/ctdb_daemon.c         |   14 ++++++++++++--
 server/ctdb_recover.c        |   24 +++++++++++++++++++-----
 server/ctdb_recoverd.c       |   38 +++++++++++++++++++++-----------------
 server/ctdb_takeover.c       |   36 ++++++++++++++++++++++++++----------
 server/ctdb_tunables.c       |    5 +++--
 server/ctdbd.c               |   13 ++-----------
 11 files changed, 95 insertions(+), 66 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/10.interface b/config/events.d/10.interface
index 3dce668..640d3db 100755
--- a/config/events.d/10.interface
+++ b/config/events.d/10.interface
@@ -142,15 +142,6 @@ case "$1" in
        [ -f /proc/sys/net/ipv4/conf/all/arp_filter ] && {
            echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
        }
-       cat "$CTDB_PUBLIC_ADDRESSES" | cut -d/ -f1 | while read _IP; do
-               _IP_HELD=`/sbin/ip addr show | grep "inet $_IP/"`
-               [ -z "$_IP_HELD" ] || {
-                       _IFACE=`echo $_IP_HELD | sed -e "s/.*\s//"`
-                       _NM=`echo $_IP_HELD | sed -e "s/.*$_IP\///" -e 
"s/\s.*//"`
-                       echo "Removing public address $_IP/$_NM from device 
$_IFACE"
-                       delete_ip_from_iface $_IFACE $_IP $_NM
-               }
-       done
        ;;
 
      #############################
@@ -253,14 +244,10 @@ case "$1" in
        iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null
        iptables -I INPUT -i $oiface -d $ip -j DROP
 
-       # we make sure the interface is up first
-       add_ip_to_iface $niface $ip $maskbits || {
-               iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null
-               exit 1;
-       }
+       delete_ip_from_iface $oiface $ip $maskbits 2>/dev/null
+       delete_ip_from_iface $niface $ip $maskbits 2>/dev/null
 
-       delete_ip_from_iface $oiface $ip $maskbits || {
-               delete_ip_from_iface $niface $ip $maskbits
+       add_ip_to_iface $niface $ip $maskbits || {
                iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null
                exit 1;
        }
diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index ed96ab8..57c81d3 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -82,6 +82,7 @@ case "$1" in
        (ctdb_check_rpc "lockd" 100021 1)
        [ $? = "0" ] || {
                echo "Trying to restart lock manager service"
+               startstop_nfs restart
                startstop_nfslock restart
                exit 1
        }
diff --git a/include/ctdb_client.h b/include/ctdb_client.h
index b2f65ee..aa9b2c0 100644
--- a/include/ctdb_client.h
+++ b/include/ctdb_client.h
@@ -105,7 +105,7 @@ int ctdb_ip_to_nodeid(struct ctdb_context *ctdb, const char 
*nodeip);
   start the ctdb protocol
 */
 int ctdb_start(struct ctdb_context *ctdb);
-int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool 
use_syslog);
+int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool 
use_syslog, const char *public_address_list);
 
 /*
   attach to a ctdb database
diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index b7df0a9..2d384a4 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -101,6 +101,7 @@ struct ctdb_tunable {
        uint32_t deterministic_public_ips;
        uint32_t reclock_ping_period;
        uint32_t no_ip_failback;
+       uint32_t disable_ip_failover;
        uint32_t verbose_memory_names;
        uint32_t recd_ping_timeout;
        uint32_t recd_ping_failcount;
@@ -454,7 +455,6 @@ 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;   
        const char *event_script_dir;
        const char *notification_script;
@@ -1372,4 +1372,6 @@ int32_t ctdb_control_get_stat_history(struct ctdb_context 
*ctdb,
                                      struct ctdb_req_control *c,
                                      TDB_DATA *outdata);
 
+int ctdb_deferred_drop_all_ips(struct ctdb_context *ctdb);
+
 #endif
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index fe1e702..8c61ec3 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -3,7 +3,7 @@ Name: ctdb
 Summary: Clustered TDB
 Vendor: Samba Team
 Packager: Samba Team <sa...@samba.org>
-Version: 1.2.8
+Version: 1.2.9
 Release: 1GITHASH
 Epoch: 0
 License: GNU GPL version 3
@@ -142,6 +142,9 @@ development libraries for ctdb
 %{_libdir}/libctdb.a
 
 %changelog
+* Tue Nov 2 2010 : Version 1.2.9
+ - Drop loglevels on several items and remove spam from the messages file
+ - Both nfs and nfslock can fail so restart both if there is a problem
 * Mon Oct 25 2010 : Version 1.2.8
  - Allow samba to specify that a new database to attach to/ create
    should use Jenkins3 hash :  CQ1019744
diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c
index 5eca727..e322453 100644
--- a/server/ctdb_daemon.c
+++ b/server/ctdb_daemon.c
@@ -704,7 +704,7 @@ static void ctdb_setup_event_callback(struct ctdb_context 
*ctdb, int status,
 /*
   start the protocol going as a daemon
 */
-int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog)
+int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool 
use_syslog, const char *public_address_list)
 {
        int res, ret = -1;
        struct fd_event *fde;
@@ -791,6 +791,14 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool 
do_fork, bool use_syslog)
        if (ctdb->methods->initialise(ctdb) != 0) {
                ctdb_fatal(ctdb, "transport failed to initialise");
        }
+       if (public_address_list) {
+               ret = ctdb_set_public_addresses(ctdb, public_address_list);
+               if (ret == -1) {
+                       DEBUG(DEBUG_ALERT,("Unable to setup public address 
list\n"));
+                       exit(1);
+               }
+       }
+
 
        /* attach to existing databases */
        if (ctdb_attach_databases(ctdb) != 0) {
@@ -815,7 +823,9 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool 
do_fork, bool use_syslog)
        tevent_fd_set_auto_close(fde);
 
        /* release any IPs we hold from previous runs of the daemon */
-       ctdb_release_all_ips(ctdb);
+       if (ctdb->tunable.disable_ip_failover == 0) {
+               ctdb_release_all_ips(ctdb);
+       }
 
        /* start the transport going */
        ctdb_start_transport(ctdb);
diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c
index 111d7a9..fe4275c 100644
--- a/server/ctdb_recover.c
+++ b/server/ctdb_recover.c
@@ -640,6 +640,22 @@ ctdb_drop_all_ips_event(struct event_context *ev, struct 
timed_event *te,
 }
 
 /*
+ * Set up an event to drop all public ips if we remain in recovery for too
+ * long
+ */
+int ctdb_deferred_drop_all_ips(struct ctdb_context *ctdb)
+{
+       if (ctdb->release_ips_ctx != NULL) {
+               talloc_free(ctdb->release_ips_ctx);
+       }
+       ctdb->release_ips_ctx = talloc_new(ctdb);
+       CTDB_NO_MEMORY(ctdb, ctdb->release_ips_ctx);
+
+       event_add_timed(ctdb->ev, ctdb->release_ips_ctx, 
timeval_current_ofs(ctdb->tunable.recovery_drop_all_ips, 0), 
ctdb_drop_all_ips_event, ctdb);
+       return 0;
+}
+
+/*
   set the recovery mode
  */
 int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb, 
@@ -659,11 +675,9 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
                talloc_free(ctdb->release_ips_ctx);
                ctdb->release_ips_ctx = NULL;
        } else {
-               talloc_free(ctdb->release_ips_ctx);
-               ctdb->release_ips_ctx = talloc_new(ctdb);
-               CTDB_NO_MEMORY(ctdb, ctdb->release_ips_ctx);
-
-               event_add_timed(ctdb->ev, ctdb->release_ips_ctx, 
timeval_current_ofs(ctdb->tunable.recovery_drop_all_ips, 0), 
ctdb_drop_all_ips_event, ctdb);
+               if (ctdb_deferred_drop_all_ips(ctdb) != 0) {
+                       DEBUG(DEBUG_ERR,("Failed to set up deferred drop all 
ips\n"));
+               }
        }
 
        if (recmode != ctdb->recovery_mode) {
diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index 161d9d6..c6bf658 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -1277,10 +1277,12 @@ static int ctdb_reload_remote_public_ips(struct 
ctdb_context *ctdb,
                        return -1;
                }
 
-               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));
-                               rec->need_takeover_run = true;
+               if (ctdb->tunable.disable_ip_failover == 0) {
+                       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));
+                                       rec->need_takeover_run = true;
+                               }
                        }
                }
 
@@ -2586,18 +2588,20 @@ static int verify_local_ip_allocation(struct 
ctdb_context *ctdb, struct ctdb_rec
           active on the local node and wait for the recmaster
           to do a full blown recovery
        */
-       for (j=0; j<ips->num; j++) {
-               if (ips->ips[j].pnn == pnn) {
-                       if (!ctdb_sys_have_ip(&ips->ips[j].addr)) {
-                               DEBUG(DEBUG_CRIT,("Public address '%s' is 
missing and we should serve this ip\n",
-                                       ctdb_addr_to_str(&ips->ips[j].addr)));
-                               need_takeover_run = true;
-                       }
-               } else {
-                       if (ctdb_sys_have_ip(&ips->ips[j].addr)) {
-                               DEBUG(DEBUG_CRIT,("We are still serving a 
public address '%s' that we should not be serving.\n", 
-                                       ctdb_addr_to_str(&ips->ips[j].addr)));
-                               need_takeover_run = true;
+       if (ctdb->tunable.disable_ip_failover == 0) {
+               for (j=0; j<ips->num; j++) {
+                       if (ips->ips[j].pnn == pnn) {
+                               if (!ctdb_sys_have_ip(&ips->ips[j].addr)) {
+                                       DEBUG(DEBUG_CRIT,("Public address '%s' 
is missing and we should serve this ip\n",
+                                               
ctdb_addr_to_str(&ips->ips[j].addr)));
+                                       need_takeover_run = true;
+                               }
+                       } else {
+                               if (ctdb_sys_have_ip(&ips->ips[j].addr)) {
+                                       DEBUG(DEBUG_CRIT,("We are still serving 
a public address '%s' that we should not be serving.\n", 
+                                               
ctdb_addr_to_str(&ips->ips[j].addr)));
+                                       need_takeover_run = true;
+                               }
                        }
                }
        }
@@ -3116,7 +3120,7 @@ static void main_loop(struct ctdb_context *ctdb, struct 
ctdb_recoverd *rec,
        /* verify that we have all ip addresses we should have and we dont
         * have addresses we shouldnt have.
         */ 
-       if (ctdb->do_checkpublicip) {
+       if (ctdb->tunable.disable_ip_failover == 0) {
                if (rec->ip_check_disable_ctx == NULL) {
                        if (verify_local_ip_allocation(ctdb, rec, pnn) != 0) {
                                DEBUG(DEBUG_ERR, (__location__ " Public IPs 
were inconsistent.\n"));
diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index d7fb5ad..d495807 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -490,15 +490,6 @@ static int32_t ctdb_do_updateip(struct ctdb_context *ctdb,
                return -1;
        }
 
-       if (vnn->iface == old) {
-               DEBUG(DEBUG_ERR,("update of IP %s/%u trying to "
-                                "assin a same interface '%s'\n",
-                                ctdb_addr_to_str(&vnn->public_address),
-                                vnn->public_netmask_bits,
-                                old->name));
-               return -1;
-       }
-
        state = talloc(vnn, struct ctdb_do_updateip_state);
        CTDB_NO_MEMORY(ctdb, state);
 
@@ -610,7 +601,7 @@ int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
                return -1;
        }
 
-       if (vnn->pnn != ctdb->pnn && have_ip) {
+       if (vnn->pnn != ctdb->pnn && have_ip && vnn->pnn != -1) {
                DEBUG(DEBUG_CRIT,(__location__ " takeoverip of IP %s is known 
to the kernel, "
                                  "and we have it on iface[%s], but it was 
assigned to node %d"
                                  "and we are node %d, banning ourself\n",
@@ -895,6 +886,10 @@ static int ctdb_add_public_address(struct ctdb_context 
*ctdb,
        vnn->public_address      = *addr;
        vnn->public_netmask_bits = mask;
        vnn->pnn                 = -1;
+       if (ctdb_sys_have_ip(addr)) {
+               DEBUG(DEBUG_ERR,("We are already hosting public address '%s'. 
setting PNN to ourself:%d\n", ctdb_addr_to_str(addr), ctdb->pnn));
+               vnn->pnn = ctdb->pnn;
+       }
 
        for (i=0; vnn->ifaces[i]; i++) {
                ret = ctdb_add_local_iface(ctdb, vnn->ifaces[i]);
@@ -905,6 +900,9 @@ static int ctdb_add_public_address(struct ctdb_context 
*ctdb,
                        talloc_free(vnn);
                        return -1;
                }
+               if (i == 0) {
+                       vnn->iface = ctdb_find_iface(ctdb, vnn->ifaces[i]);
+               }
        }
 
        DLIST_ADD(ctdb->vnn, vnn);
@@ -1159,6 +1157,16 @@ static uint32_t *ip_key(ctdb_sock_addr *ip)
 
 static void *add_ip_callback(void *parm, void *data)
 {
+       struct ctdb_public_ip_list *this_ip = parm; 
+       struct ctdb_public_ip_list *prev_ip = data; 
+
+       if (prev_ip == NULL) {
+               return parm;
+       }
+       if (this_ip->pnn == -1) {
+               this_ip->pnn = prev_ip->pnn;
+       }
+
        return parm;
 }
 
@@ -1235,6 +1243,13 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct 
ctdb_node_map *nodemap)
        struct ctdb_client_control_state *state;
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
 
+       /*
+        * ip failover is completely disabled, just send out the 
+        * ipreallocated event.
+        */
+       if (ctdb->tunable.disable_ip_failover != 0) {
+               goto ipreallocated;
+       }
 
        ZERO_STRUCT(ip);
 
@@ -1537,6 +1552,7 @@ finished:
                return -1;
        }
 
+ipreallocated:
        /* tell all nodes to update natwg */
        /* send the flags update natgw on all connected nodes */
        data.dptr  = discard_const("ipreallocated");
diff --git a/server/ctdb_tunables.c b/server/ctdb_tunables.c
index 4a3cfbb..47694b7 100644
--- a/server/ctdb_tunables.c
+++ b/server/ctdb_tunables.c
@@ -34,7 +34,7 @@ static const struct {
        { "RecoverTimeout",      20,  offsetof(struct ctdb_tunable, 
recover_timeout) },
        { "RecoverInterval",      1,  offsetof(struct ctdb_tunable, 
recover_interval) },
        { "ElectionTimeout",      3,  offsetof(struct ctdb_tunable, 
election_timeout) },
-       { "TakeoverTimeout",      5,  offsetof(struct ctdb_tunable, 
takeover_timeout) },
+       { "TakeoverTimeout",      9,  offsetof(struct ctdb_tunable, 
takeover_timeout) },
        { "MonitorInterval",     15,  offsetof(struct ctdb_tunable, 
monitor_interval) },
        { "TickleUpdateInterval",20,  offsetof(struct ctdb_tunable, 
tickle_update_interval) },
        { "EventScriptTimeout",  30,  offsetof(struct ctdb_tunable, 
script_timeout) },
@@ -49,12 +49,13 @@ static const struct {
        { "DeterministicIPs",     1,  offsetof(struct ctdb_tunable, 
deterministic_public_ips) },
        { "ReclockPingPeriod",   60,  offsetof(struct ctdb_tunable,  
reclock_ping_period) },
        { "NoIPFailback",         0,  offsetof(struct ctdb_tunable, 
no_ip_failback) },
+       { "DisableIPFailover",    0,  offsetof(struct ctdb_tunable, 
disable_ip_failover) },
        { "VerboseMemoryNames",   0,  offsetof(struct ctdb_tunable, 
verbose_memory_names) },
        { "RecdPingTimeout",     60,  offsetof(struct ctdb_tunable, 
recd_ping_timeout) },
        { "RecdFailCount",       10,  offsetof(struct ctdb_tunable, 
recd_ping_failcount) },
        { "LogLatencyMs",         0,  offsetof(struct ctdb_tunable, 
log_latency_ms) },
        { "RecLockLatencyMs",  1000,  offsetof(struct ctdb_tunable, 
reclock_latency_ms) },
-       { "RecoveryDropAllIPs",  60,  offsetof(struct ctdb_tunable, 
recovery_drop_all_ips) },
+       { "RecoveryDropAllIPs", 120,  offsetof(struct ctdb_tunable, 
recovery_drop_all_ips) },
        { "VerifyRecoveryLock",   1,  offsetof(struct ctdb_tunable, 
verify_recovery_lock) },
        { "VacuumDefaultInterval", 300,  offsetof(struct ctdb_tunable, 
vacuum_default_interval) },
        { "VacuumMaxRunTime",     30,  offsetof(struct ctdb_tunable, 
vacuum_max_run_time) },
diff --git a/server/ctdbd.c b/server/ctdbd.c
index f8647f0..b90dbcd 100644
--- a/server/ctdbd.c
+++ b/server/ctdbd.c
@@ -207,6 +207,7 @@ 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) {
@@ -299,14 +300,6 @@ int main(int argc, const char *argv[])
                }
        }
 
-       if (options.public_address_list) {
-               ret = ctdb_set_public_addresses(ctdb, 
options.public_address_list);
-               if (ret == -1) {
-                       DEBUG(DEBUG_ALERT,("Unable to setup public address 
list\n"));
-                       exit(1);
-               }
-       }
-
        ret = ctdb_set_event_script_dir(ctdb, options.event_script_dir);
        if (ret == -1) {
                DEBUG(DEBUG_ALERT,("Unable to setup event script directory\n"));
@@ -323,8 +316,6 @@ 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 {
@@ -338,5 +329,5 @@ int main(int argc, const char *argv[])
        }
 
        /* start the protocol running (as a child) */
-       return ctdb_start_daemon(ctdb, interactive?False:True, 
options.use_syslog);
+       return ctdb_start_daemon(ctdb, interactive?False:True, 
options.use_syslog, options.public_address_list);
 }


-- 
CTDB repository

Reply via email to