]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rename ctdb_control utility to ctdb
authorAndrew Tridgell <tridge@samba.org>
Tue, 29 May 2007 00:59:12 +0000 (10:59 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 29 May 2007 00:59:12 +0000 (10:59 +1000)
(This used to be ctdb commit 7fc3868a1a49aa8b49b277793eede903606b4353)

ctdb/Makefile.in
ctdb/takeover/ctdb_takeover.c

index 41839c7ed17ff1068fe11119fa958fdc1113177f..d4fbc95edeac3510121065bc50e9305c135a13eb 100644 (file)
@@ -68,7 +68,7 @@ bin/ctdbd: $(OBJS) direct/ctdbd.o
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ direct/ctdbd.o $(OBJS) $(LIB_FLAGS)
 
-bin/ctdb_control: $(OBJS) tools/ctdb_control.o 
+bin/ctdb: $(OBJS) tools/ctdb_control.o 
        @echo Linking $@
        @$(CC) $(CFLAGS) -o $@ tools/ctdb_control.o $(OBJS) $(LIB_FLAGS)
 
index cc2369f339ae431a2d5a646b402a21371cd2c239..f4a9540ba0d442de8c9d48d4d209380450be3d52 100644 (file)
@@ -252,14 +252,17 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap)
                        for (j=(i+1)%nodemap->num;
                             j != i;
                             j=(j+1)%nodemap->num) {
-                               if (nodemap->nodes[j].flags & NODE_FLAGS_CONNECTED) {
+                               if ((nodemap->nodes[j].flags & NODE_FLAGS_CONNECTED) && 
+                                   same_subnet(nodemap->nodes[j]->public_address, nodemap->nodes[i]->public_address, 
+                                               nodemap->nodes[i]->public_netmask)) {
                                        ctdb->nodes[i]->takeover_vnn = nodemap->nodes[j].vnn;
                                        break;
                                }
                        }
                        if (j == i) {
-                               DEBUG(0,(__location__ " No node available to assign to??\n"));
-                               return -1;
+                               DEBUG(0,(__location__ " No node available on same network to take %s\n",
+                                        nodemap->nodes[i]->public_address));
+                               ctdb->nodes[i]->takeover_vnn = -1;      
                        }
                }
        }