diff options
Diffstat (limited to 'ctdb/config/functions')
-rwxr-xr-x | ctdb/config/functions | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/ctdb/config/functions b/ctdb/config/functions index e685c07ace..2668531ca8 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -689,11 +689,26 @@ service_reconfigure () ctdb_service_check_reconfigure () { - [ "$event_name" = "monitor" ] || return 0 + # Only do this for certain events. + case "$event_name" in + monitor|ipreallocated) : ;; + *) return 0 + esac if ctdb_service_needs_reconfigure "$@" ; then ctdb_service_reconfigure "$@" - exit 0 + + # Fall through to non-monitor events. + [ "$event_name" = "monitor" ] || return 0 + + # We don't want to proceed with the rest of the monitor event + # here, so we exit. However, if we exit 0 then, if the + # service was previously broken, we might return a false + # positive. So we simply retrieve the status of this script + # from the previous monitor loop and exit with that status. + ctdb scriptstatus | \ + grep -q -E "^${script_name}[[:space:]]+Status:OK[[:space:]]" + exit $? fi } |