mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
ctdb-scripts: Don't shutdown CTDB when memory monitoring fails
Marking the node unhealthy should cause Samba processes to close, possible freeing a stack of memory. If not, then it is somebody else's problem. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
b6a0e4b856
commit
e6b5163bc1
@ -78,13 +78,9 @@ monitor_filesystem_usage ()
|
||||
|
||||
dump_memory_info ()
|
||||
{
|
||||
echo "CRITICAL: Shutting down CTDB!!!"
|
||||
get_proc "meminfo"
|
||||
ps auxfww
|
||||
set_proc "sysrq-trigger" "m"
|
||||
ctdb disable
|
||||
sleep 3
|
||||
ctdb shutdown
|
||||
}
|
||||
|
||||
monitor_memory_usage ()
|
||||
|
@ -11,10 +11,8 @@ CTDB_MONITOR_SWAP_USAGE=":50"
|
||||
|
||||
required_result 1 <<EOF
|
||||
ERROR: System swap utilization 90% >= threshold 50%
|
||||
CRITICAL: Shutting down CTDB!!!
|
||||
$FAKE_PROC_MEMINFO
|
||||
$(ps foobar)
|
||||
CTDB says BYE!
|
||||
EOF
|
||||
|
||||
simple_test
|
||||
|
@ -11,10 +11,8 @@ CTDB_MONITOR_SWAP_USAGE=""
|
||||
|
||||
required_result 1 <<EOF
|
||||
ERROR: System memory utilization 90% >= threshold 85%
|
||||
CRITICAL: Shutting down CTDB!!!
|
||||
$FAKE_PROC_MEMINFO
|
||||
$(ps foobar)
|
||||
CTDB says BYE!
|
||||
EOF
|
||||
|
||||
simple_test
|
||||
|
@ -11,7 +11,6 @@ CTDB_MONITOR_SWAP_USAGE=""
|
||||
|
||||
required_result 1 <<EOF
|
||||
ERROR: System memory utilization 87% >= threshold 80%
|
||||
CRITICAL: Shutting down CTDB!!!
|
||||
MemTotal: 3940712 kB
|
||||
MemFree: 225268 kB
|
||||
Buffers: 146120 kB
|
||||
@ -36,7 +35,6 @@ root 1 0.0 0.0 2976 624 ? Ss Aug28 0:07 init [2]
|
||||
root 495 0.0 0.0 3888 1640 ? Ss Aug28 0:00 udevd --daemon
|
||||
...
|
||||
[MORE FAKE ps OUTPUT]
|
||||
CTDB says BYE!
|
||||
EOF
|
||||
|
||||
simple_test
|
||||
|
Loading…
x
Reference in New Issue
Block a user