[SCM] CTDB repository - branch master updated - ctdb-1.0.114-87-g8e9fd36

Ronnie Sahlberg sahlberg at samba.org
Wed May 19 20:44:23 MDT 2010


The branch, master has been updated
       via  8e9fd36e4619b7cc7bb6f7f7416d13e4c00a296a (commit)
      from  66e05500b6e5c8fa5efbcba4447e488dd4232897 (commit)

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


- Log -----------------------------------------------------------------
commit 8e9fd36e4619b7cc7bb6f7f7416d13e4c00a296a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu May 20 12:35:57 2010 +1000

    In control_ipreallocate() we wait at most 5 tries before aborting the command
    and returning an error.
    This might not be sufficient if there are several recoveries in a row.
    
    Instead loop as long as it takes for the recovery master to finish the recoveries and re
    spond to the ipreallocate call.
    
    Increase the log level of the error message when the recovery master was busy and could
    not perform the ipreallocation promptly
    
    BZ61783

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

Summary of changes:
 tools/ctdb.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tools/ctdb.c b/tools/ctdb.c
index dc88602..fa45686 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -2007,15 +2007,10 @@ static int control_ipreallocate(struct ctdb_context *ctdb, int argc, const char
 	data.dsize = sizeof(rd);
 
 again:
-	if (retries>5) {
-		DEBUG(DEBUG_ERR,("Failed waiting for cluster convergense\n"));
-		exit(10);
-	}
-
 	/* check that there are valid nodes available */
 	if (ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), options.pnn, ctdb, &nodemap) != 0) {
 		DEBUG(DEBUG_ERR, ("Unable to get nodemap from local node\n"));
-		exit(10);
+		return -1;
 	}
 	for (i=0; i<nodemap->num;i++) {
 		if ((nodemap->nodes[i].flags & (NODE_FLAGS_DELETED|NODE_FLAGS_BANNED|NODE_FLAGS_STOPPED)) == 0) {
@@ -2037,7 +2032,7 @@ again:
 	/* verify the node exists */
 	if (ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), recmaster, ctdb, &nodemap) != 0) {
 		DEBUG(DEBUG_ERR, ("Unable to get nodemap from local node\n"));
-		exit(10);
+		return -1;
 	}
 
 
@@ -2079,14 +2074,14 @@ again:
 
 	tv = timeval_current();
 	/* this loop will terminate when we have received the reply */
-	while (timeval_elapsed(&tv) < 3.0) {	
+	while (timeval_elapsed(&tv) < 3.0) {
 		event_loop_once(ctdb->ev);
 	}
 	if (ipreallocate_finished == 1) {
 		return 0;
 	}
 
-	DEBUG(DEBUG_INFO,("Timed out waiting for recmaster ipreallocate. Trying again\n"));
+	DEBUG(DEBUG_ERR,("Timed out waiting for recmaster ipreallocate. Trying again\n"));
 	retries++;
 	sleep(1);
 	goto again;


-- 
CTDB repository


More information about the samba-cvs mailing list