------------------------------------------------------------
revno: 481
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Wed 2007-06-06 16:49:59 +1000
message:
handle the case of all nodes being sick for one service
modified:
takeover/ctdb_takeover.c
ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2
=== modified file 'takeover/ctdb_takeover.c'
--- a/takeover/ctdb_takeover.c 2007-06-06 03:45:12 +0000
+++ b/takeover/ctdb_takeover.c 2007-06-06 06:49:59 +0000
@@ -432,6 +432,28 @@
break;
}
}
+
+ /* if no enabled node can take it, then we
+ might as well use any connected node. It
+ probably means that some subsystem (such as
+ NFS) is sick on all nodes. Best we can do
+ is to keep the other services up. */
+ if (j == i) {
+ for (j=(i+1)%nodemap->num;
+ j != i;
+ j=(j+1)%nodemap->num) {
+ if ((nodemap->nodes[j].flags &
NODE_FLAGS_CONNECTED) &&
+
ctdb_same_subnet(ctdb->nodes[j]->public_address,
+
ctdb->nodes[i]->public_address,
+
ctdb->nodes[j]->public_netmask_bits)) {
+ ctdb->nodes[i]->takeover_vnn =
nodemap->nodes[j].vnn;
+ DEBUG(0,("All available nodes
disabled for %s - using a connected node\n",
+
ctdb->nodes[i]->public_address));
+ break;
+ }
+ }
+ }
+
if (j == i) {
DEBUG(0,(__location__ " No node available on
same network to take %s\n",
ctdb->nodes[i]->public_address));