mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
2a14f91722
This should eventually be able to replace ctdb_check_counter_limit() and ctdb_check_counter_equal(), although it doesn't issue warnings like the former. It takes 4 optional arguments: 1. _msg - If "error" then over limit causes an error message and and exit 1. Anything else fails silently but the function returns 1. Default is "error". 2. _op - An integer operator supported by test (e.g. -eq, -ge, -gt). Default is -ge. 3. _limit - Limit for the counter to be used in comparison. Default is $service_fail_limit. 4. _service_name - Used to identify the counter. Default is $service_name. For example: ctdb_check_counter error -ge 5 foo will print a message and exit 1 if the counter for foo is >= 5, whereas ctdb_check_counter check -ge 5 foo will just return 1 if the counter for foo is >= 5, and ctdb_counter_check with print a message and exit 1 if the counter for $service_name is >= $service_fail_limit. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5b01b7233515669e995e037205796e265643b176) |
||
---|---|---|
.. | ||
events.d | ||
ctdb-crash-cleanup.sh | ||
ctdb.init | ||
ctdb.sysconfig | ||
functions | ||
gdb_backtrace | ||
interface_modify.sh | ||
notify.sh | ||
README | ||
statd-callout |
This directory contains run-time support scripts for CTDB. Selected highlights: ctdb.init An initscript for starting ctdbd at boot time. events.d/ Eventscripts. See events.d/README for more details. functions Support functions, sourced by eventscripts and other scripts. interface_modify.sh Script to support add/remove IPs and other funky stuff. Not sure why this is separate... but it certainly allows easy wrapping by flock. statd-callout rpc.statd high-availability callout to support lock migration on failover. Notes: * All of these scripts are written in POSIX Bourne shell. Please avoid bash-isms, including the use of "local" variables (which are not available in POSIX shell). * Do not use absolute paths for commands. Unit tests attempt to replace many commands with stubs and can not do this if commands are specified with absolute paths. The functions file controls $PATH so absolute paths should not be required.