if there is no node available to take an IP, don't consider that an error
authorAndrew Tridgell <tridge@samba.org>
Thu, 31 May 2007 01:22:43 +0000 (11:22 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 31 May 2007 01:22:43 +0000 (11:22 +1000)
(This used to be ctdb commit fee6561626c7070418bc8f4d610a728329ac4bcc)

ctdb/takeover/ctdb_takeover.c

index cadb1a80c34f5a1eb6c4492e22b038a4c458f1c2..cf65055f7be89cb2533d8f0d823f9167cb24dc9e 100644 (file)
@@ -361,6 +361,10 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap)
 
        /* tell all nodes to get their own IPs */
        for (i=0;i<nodemap->num;i++) {
+               if (ctdb->nodes[i]->takeover_vnn == -1) {
+                       /* this IP won't be taken over */
+                       continue;
+               }
                ret = ctdb_ctrl_takeover_ip(ctdb, TAKEOVER_TIMEOUT(), 
                                            ctdb->nodes[i]->takeover_vnn, 
                                            ctdb->nodes[i]->public_address);