ctdb-daemon: Do not process tickle updates for hosted IP addresses
authorMartin Schwenke <martin@meltin.net>
Fri, 27 Mar 2015 04:30:16 +0000 (15:30 +1100)
committerAmitay Isaacs <amitay@samba.org>
Fri, 4 Dec 2015 08:17:17 +0000 (09:17 +0100)
Tickle list updates are broadcast to all connected nodes and are
accepted even when received on the same node that sent them.  This
could actually lead to lost connection information when information
about new connections is received while an update is in-flight.

Instead, return early when the IP is hosted on the current node, since
it is the only one that could have sent the update.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_takeover.c

index 00d35e1636717df58fc6aba768ded0aab2e08213..13679d4ea5e65a5f959ef32fb5fda907b4051e6b 100644 (file)
@@ -3812,6 +3812,13 @@ int32_t ctdb_control_set_tcp_tickle_list(struct ctdb_context *ctdb, TDB_DATA ind
                return 1;
        }
 
+       if (vnn->pnn == ctdb->pnn) {
+               DEBUG(DEBUG_INFO,
+                     ("Ignoring redundant set tcp tickle list, this node hosts '%s'\n",
+                      ctdb_addr_to_str(&list->addr)));
+               return 0;
+       }
+
        /* remove any old ticklelist we might have */
        talloc_free(vnn->tcp_array);
        vnn->tcp_array = NULL;