Eventscripts - conditionally inherit ctdbd debug level in each monitor event
authorMartin Schwenke <martin@meltin.net>
Tue, 16 Aug 2011 23:14:23 +0000 (09:14 +1000)
committerMartin Schwenke <martin@meltin.net>
Tue, 16 Aug 2011 23:14:23 +0000 (09:14 +1000)
Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/00.ctdb

index 31f8fdc79bbc76b2e959fc87ef7fc6513f504c4f..321ba9c708836bb345022471cd6fc3f4cf56fe44 100755 (executable)
@@ -63,6 +63,11 @@ case "$1" in
        update_config_from_tdb &
        ;;
     monitor)
+       # Inherit the debug level from ctdbd on each monitor run.  If
+       # there's a more urgent need then override CTDB_CURRENT_DEBUGLEVEL
+       # using a file in $CTDB_BASE/rc.local.d/.
+        ctdb_set_current_debuglevel create
+
        # We should never enter swap, so SwapTotal == SwapFree.
        [ "$CTDB_CHECK_SWAP_IS_NOT_USED" = "yes" ] && {
            if [ -n "`grep '^Swap\(Total\|Free\)' /proc/meminfo | uniq -s 10 -u`" ]; then