]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
make sure reconnected nodes start off as unhealthy so they don't get a public IP
authorAndrew Tridgell <tridge@samba.org>
Wed, 10 Oct 2007 00:45:22 +0000 (10:45 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 10 Oct 2007 00:45:22 +0000 (10:45 +1000)
(This used to be ctdb commit c733ec6760cae01ce277f491caf1355e46de5cf7)

ctdb/server/ctdb_server.c

index d1ef4f46f33ca88cdd9c75b2e880a771731ac62f..5c579f00228d38be96cfc71b4975164846f6ffb8 100644 (file)
@@ -335,7 +335,7 @@ void ctdb_node_dead(struct ctdb_node *node)
                return;
        }
        node->ctdb->num_connected--;
-       node->flags |= NODE_FLAGS_DISCONNECTED;
+       node->flags |= NODE_FLAGS_DISCONNECTED | NODE_FLAGS_UNHEALTHY;
        node->rx_cnt = 0;
        node->dead_count = 0;
        DEBUG(1,("%s: node %s is dead: %u connected\n", 
@@ -357,6 +357,7 @@ void ctdb_node_connected(struct ctdb_node *node)
        node->ctdb->num_connected++;
        node->dead_count = 0;
        node->flags &= ~NODE_FLAGS_DISCONNECTED;
+       node->flags |= NODE_FLAGS_UNHEALTHY;
        DEBUG(1,("%s: connected to %s - %u connected\n", 
                 node->ctdb->name, node->name, node->ctdb->num_connected));
 }