[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-405-g8b78587

Ronnie Sahlberg sahlberg at samba.org
Sun Mar 20 20:58:32 MDT 2011


The branch, 1.2 has been updated
       via  8b78587848acb685a7a15e52b79c186597ea8852 (commit)
       via  1e30004f0c63572d721a2c2f53d8a6bccdb5ec45 (commit)
       via  24d7910be90df164255b7181ee2e2a086b04f396 (commit)
      from  ef0f15d14663b757fcfd05e4365e5a364659a812 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=1.2


- Log -----------------------------------------------------------------
commit 8b78587848acb685a7a15e52b79c186597ea8852
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Mar 21 13:02:31 2011 +1100

    New version 1.2.27

commit 1e30004f0c63572d721a2c2f53d8a6bccdb5ec45
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Mar 21 13:07:17 2011 +1030

    ctdbd: call tdb_reopen_all() in freeze child.
    
    In theory, the ctdbd parent shouldn't be holding any locks, but it's a good
    idea to always call tdb_reopen_all() after a fork().

commit 24d7910be90df164255b7181ee2e2a086b04f396
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Mar 21 13:03:01 2011 +1030

    ctdbd: fix lock held on error ("ctdb_req_dmaster from non-master.")
    
    We should release the lock on the record before returning; otherwise the
    recovery (which tries to freeze the database) will fail.  Symptoms are as
    follows:
    
    ctdbd: pnn 15 dmaster request for new-dmaster 19 from non-master 1 real-dmaster=5 key f049c3c8 dbid 0x6cf2837d gen=1148812532 curgen=1148812532 c->rsn=2 header.rsn=15 reqid=2147483585 keyval=0x4f464e49
    ctdbd: ctdb_req_dmaster from non-master. Force a recovery.
    ...
    ctdbd: freeze_lock-1:server/ctdb_freeze.c:55 Failed to lock database registry.tdb
    
    CQ:1022545

-----------------------------------------------------------------------

Summary of changes:
 packaging/RPM/ctdb.spec.in |    5 ++++-
 server/ctdb_call.c         |    1 +
 server/ctdb_freeze.c       |    5 +++++
 3 files changed, 10 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index dca6015..00cead2 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -3,7 +3,7 @@ Name: ctdb
 Summary: Clustered TDB
 Vendor: Samba Team
 Packager: Samba Team <samba at samba.org>
-Version: 1.2.26
+Version: 1.2.27
 Release: 1GITHASH
 Epoch: 0
 License: GNU GPL version 3
@@ -143,6 +143,9 @@ development libraries for ctdb
 %{_libdir}/libctdb.a
 
 %changelog
+* Mon Mar 21 2011 : Version 1.2.27
+ - Fix a tdb_lock all bug in the ctdb_req_dmaster from non-master code.
+   CQ S1022545
 * Mon Mar 21 2011 : Version 1.2.26
  - Fix a talloc hierarchy bug for the deferred attach context
    CQ S1022515
diff --git a/server/ctdb_call.c b/server/ctdb_call.c
index 73072c3..0ea76bf 100644
--- a/server/ctdb_call.c
+++ b/server/ctdb_call.c
@@ -421,6 +421,7 @@ void ctdb_request_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr
 			DEBUG(DEBUG_ERR,("ctdb_req_dmaster from non-master. Force a recovery.\n"));
 
 			ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE;
+			ctdb_ltdb_unlock(ctdb_db, key);
 			return;
 		}
 	}
diff --git a/server/ctdb_freeze.c b/server/ctdb_freeze.c
index 0f70fd3..9eb2493 100644
--- a/server/ctdb_freeze.c
+++ b/server/ctdb_freeze.c
@@ -204,6 +204,11 @@ static struct ctdb_freeze_handle *ctdb_freeze_lock(struct ctdb_context *ctdb, ui
 		close(fd[0]);
 
 		debug_extra = talloc_asprintf(NULL, "freeze_lock-%u:", priority);
+		if (tdb_reopen_all(true) != 0) {
+			DEBUG(DEBUG_ERR,(__location__ " Failed to reopen databases\n"));
+			_exit(0);
+		}
+
 		ret = ctdb_lock_all_databases(ctdb, priority);
 		if (ret != 0) {
 			_exit(0);


-- 
CTDB repository


More information about the samba-cvs mailing list