Rev 646: fixed several places where we set the recovery culprit
incorrectly in http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Fri Oct 5 03:51:32 GMT 2007
------------------------------------------------------------
revno: 646
revision-id: tridge at samba.org-20071005035131-wb6hztn4jnypjsqi
parent: tridge at samba.org-20071005032821-gnm4te9ogcb2tmpw
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Fri 2007-10-05 13:51:31 +1000
message:
fixed several places where we set the recovery culprit incorrectly
modified:
server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
=== modified file 'server/ctdb_recoverd.c'
--- a/server/ctdb_recoverd.c 2007-10-05 03:28:21 +0000
+++ b/server/ctdb_recoverd.c 2007-10-05 03:51:31 +0000
@@ -735,6 +735,7 @@
if (rec->last_culprit != culprit ||
timeval_elapsed(&rec->first_recover_time) > ctdb->tunable.recovery_grace_period) {
+ DEBUG(0,("New recovery culprit %u\n", culprit));
/* either a new node is the culprit, or we've decide to forgive them */
rec->last_culprit = culprit;
rec->first_recover_time = timeval_current();
@@ -1679,7 +1680,7 @@
if (rec->need_recovery) {
/* a previous recovery didn't finish */
- do_recovery(rec, mem_ctx, pnn, num_active, nodemap, vnnmap, nodemap->nodes[j].pnn);
+ do_recovery(rec, mem_ctx, pnn, num_active, nodemap, vnnmap, ctdb->pnn);
goto again;
}
@@ -1688,7 +1689,7 @@
*/
switch (verify_recmode(ctdb, nodemap)) {
case MONITOR_RECOVERY_NEEDED:
- do_recovery(rec, mem_ctx, pnn, num_active, nodemap, vnnmap, nodemap->nodes[j].pnn);
+ do_recovery(rec, mem_ctx, pnn, num_active, nodemap, vnnmap, ctdb->pnn);
goto again;
case MONITOR_FAILED:
goto again;
@@ -1702,7 +1703,7 @@
/* we should have the reclock - check its not stale */
if (ctdb->recovery_lock_fd == -1) {
DEBUG(0,("recovery master doesn't have the recovery lock\n"));
- do_recovery(rec, mem_ctx, pnn, num_active, nodemap, vnnmap, pnn);
+ do_recovery(rec, mem_ctx, pnn, num_active, nodemap, vnnmap, ctdb->pnn);
goto again;
}
@@ -1710,7 +1711,7 @@
DEBUG(0,("failed read from recovery_lock_fd - %s\n", strerror(errno)));
close(ctdb->recovery_lock_fd);
ctdb->recovery_lock_fd = -1;
- do_recovery(rec, mem_ctx, pnn, num_active, nodemap, vnnmap, pnn);
+ do_recovery(rec, mem_ctx, pnn, num_active, nodemap, vnnmap, ctdb->pnn);
goto again;
}
@@ -1867,7 +1868,7 @@
if (ret != 0) {
DEBUG(0, (__location__ " Unable to setup public takeover addresses - starting recovery\n"));
do_recovery(rec, mem_ctx, pnn, num_active, nodemap,
- vnnmap, nodemap->nodes[j].pnn);
+ vnnmap, ctdb->pnn);
}
}
More information about the samba-cvs
mailing list