[SCM] CTDB repository - branch master updated - ctdb-1.0.98-7-gbefabc9

Ronnie Sahlberg sahlberg at samba.org
Tue Oct 20 23:48:22 MDT 2009


The branch, master has been updated
       via  befabc917edb036ca81f5216f65a6d62b26ee83e (commit)
      from  87146db2769c2ec494813685bf9cec0d2a6336c3 (commit)

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


- Log -----------------------------------------------------------------
commit befabc917edb036ca81f5216f65a6d62b26ee83e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Oct 21 16:50:39 2009 +1100

    During tests it is common to add/delete test eventscripts at runtime.
    This can race with teh eventascript handling that does a :
    
    list all scripts,   sort them,  then execute them
    
    so trap status code 127 which means the script could not be executed (or /bin/sh does not exist) and treat it as not to cause the node to become unhealthy

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

Summary of changes:
 server/eventscript.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/eventscript.c b/server/eventscript.c
index e84f130..8a62af9 100644
--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -593,6 +593,11 @@ static int ctdb_event_script_v(struct ctdb_context *ctdb, const char *options)
 		if (ret != -1) {
 			ret = WEXITSTATUS(ret);
 		}
+		if (ret == 127) {
+			ret = 0;
+			DEBUG(DEBUG_ERR,("Script %s returned status 127. Someone just deleted it?\n", cmdstr));
+		}
+ 
 		if (is_monitor == 1) {
 			if (ctdb_ctrl_event_script_stop(ctdb, ret) != 0) {
 				DEBUG(DEBUG_ERR,(__location__ " Failed to stop event script monitoring\n"));


-- 
CTDB repository


More information about the samba-cvs mailing list