[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-82-ge401000
Ronnie Sahlberg
sahlberg at samba.org
Wed May 19 20:44:23 MDT 2010
The branch, 1.0.112 has been updated
via e4010008c9e01f6ef32d845cccdc786411d3b8c3 (commit)
from 0a9d9f101c7c2a318b0d432b95a152f37b0dd7fd (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.112
- Log -----------------------------------------------------------------
commit e4010008c9e01f6ef32d845cccdc786411d3b8c3
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 7ae3974..0976366 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -1759,15 +1759,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) {
@@ -1789,7 +1784,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;
}
@@ -1830,11 +1825,11 @@ 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);
}
- 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