------------------------------------------------------------
revno: 439
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Sun 2007-06-03 10:29:14 +1000
message:
fixed a race condition in the handling of the recovery lock
modified:
common/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1
common/ctdb_recover.c
ctdb_recover.c-20070503002147-admmfgt1oj6gexfo-1
common/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
=== modified file 'common/ctdb_call.c'
--- a/common/ctdb_call.c 2007-05-31 03:50:53 +0000
+++ b/common/ctdb_call.c 2007-06-03 00:29:14 +0000
@@ -394,8 +394,9 @@
/* its a protocol error if the sending node is not the current dmaster
*/
if (header.dmaster != hdr->srcnode) {
- DEBUG(0,("vnn %u dmaster request non-master %u dmaster=%u key
%08x\n",
- ctdb->vnn, hdr->srcnode, header.dmaster,
ctdb_hash(&key)));
+ DEBUG(0,("vnn %u dmaster request non-master %u dmaster=%u key
%08x dbid 0x%08x\n",
+ ctdb->vnn, hdr->srcnode, header.dmaster,
ctdb_hash(&key),
+ ctdb_db->db_id));
ctdb_fatal(ctdb, "ctdb_req_dmaster from non-master");
return;
}
=== modified file 'common/ctdb_recover.c'
--- a/common/ctdb_recover.c 2007-06-02 03:16:11 +0000
+++ b/common/ctdb_recover.c 2007-06-03 00:29:14 +0000
@@ -487,8 +487,8 @@
/* we should not be able to get the lock on the nodes list, as it
should be
held by the recovery master */
if (ctdb_recovery_lock(ctdb, false)) {
- DEBUG(0,("ERROR: node list not locked when recovering!\n"));
- ctdb_fatal(ctdb, "node list not locked - make sure it is on
shared storage");
+ DEBUG(0,("ERROR: recovery lock file %s not locked when
recovering!\n",
+ ctdb->recovery_lock_file));
return -1;
}
=== modified file 'common/ctdb_recoverd.c'
--- a/common/ctdb_recoverd.c 2007-06-02 01:36:42 +0000
+++ b/common/ctdb_recoverd.c 2007-06-03 00:29:14 +0000
@@ -614,7 +614,8 @@
}
/* release the recmaster lock */
- if (ctdb->recovery_lock_fd != -1) {
+ if (em->vnn != ctdb_get_vnn(ctdb) &&
+ ctdb->recovery_lock_fd != -1) {
close(ctdb->recovery_lock_fd);
ctdb->recovery_lock_fd = -1;
}