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
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"));