[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-68-gc07cd2c
Ronnie Sahlberg
sahlberg at samba.org
Thu Apr 22 17:09:49 MDT 2010
The branch, 1.0.112 has been updated
via c07cd2cb042d62ee4adcfa1b75dd423424ca681b (commit)
via 74f4b60513152a4806907f862d9c31511c961d1d (commit)
via f56a3be918fa37356fdd5481c7b80f65c90ca7ca (commit)
from 5ba7028ce62b747db84dfccea0c5168e5de16228 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.112
- Log -----------------------------------------------------------------
commit c07cd2cb042d62ee4adcfa1b75dd423424ca681b
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Fri Apr 23 09:07:03 2010 +1000
New version 1.0.112-17
* Fri Apr 23 2010 : Version 1.0.112-17
- In ctdb-crash-cleanup.sh also check for and remove the NATGW address
if set.
- Add monitoring and warning of low memory condition
CTDB_MONITOR_FREE_MEMORY_WARN
commit 74f4b60513152a4806907f862d9c31511c961d1d
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Fri Apr 23 08:52:09 2010 +1000
Add a setting where CTDB will monitor and warn for low memory conditions.
CTDB_MONITOR_FREE_MEMORY_WARN
BZ 59747
commit f56a3be918fa37356fdd5481c7b80f65c90ca7ca
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Fri Apr 23 08:35:01 2010 +1000
In the example script to remove all ip addresses after a ctdb crash,
add the NATGW address as one to be removed in addition to the
public addresses.
-----------------------------------------------------------------------
Summary of changes:
config/ctdb-crash-cleanup.sh | 2 +-
config/ctdb.sysconfig | 15 ++++++++++-----
config/events.d/00.ctdb | 8 ++++++++
packaging/RPM/ctdb.spec.in | 7 ++++++-
4 files changed, 25 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/config/ctdb-crash-cleanup.sh b/config/ctdb-crash-cleanup.sh
index ca6a838..420db76 100755
--- a/config/ctdb-crash-cleanup.sh
+++ b/config/ctdb-crash-cleanup.sh
@@ -22,7 +22,7 @@ ctdb status 2>/dev/null && {
exit 0
}
-cat "$CTDB_PUBLIC_ADDRESSES" | cut -d/ -f1 | while read _IP; do
+(cat /etc/sysconfig/ctdb | egrep "^CTDB_NATGW_PUBLIC_IP" | sed -e "s/.*=//" -e "s/\/.*//";cat "$CTDB_PUBLIC_ADDRESSES" | cut -d/ -f1) | while read _IP; do
_IP_HELD=`/sbin/ip addr show | grep "inet $_IP/"`
[ -z "$_IP_HELD" ] || {
_IFACE=`echo $_IP_HELD | sed -e "s/.*\s//"`
diff --git a/config/ctdb.sysconfig b/config/ctdb.sysconfig
index bc31001..248e944 100644
--- a/config/ctdb.sysconfig
+++ b/config/ctdb.sysconfig
@@ -112,14 +112,19 @@ CTDB_RECOVERY_LOCK="/some/place/on/shared/storage"
# defaults to tcp
# CTDB_TRANSPORT="tcp"
-# When set, this variable makes ctdb monitor the amount of free memory
-# in the system (the second number in the buffers/cache output from free -m).
-# If the amount of free memory drops below this treshold the node will become
-# unhealthy and ctdb and all managed services will be shutdown.
+# These setting allow monitoring for low/out-out of memory conditions.
+#
+# If set, once available memory drops below CTDB_MONITOR_FREE_MEMORY_WARN
+# ctdb will start logging messages that memory is low, but will not
+# take any further action.
+#
+# If the amount of free memory drops below CTDB_MONITOR_FREE_MEMORY
+# ctdb will fail all service over to a different node and finally shutdown.
# Once this occurs, the administrator needs to find the reason for the OOM
# situation, rectify it and restart ctdb with "service ctdb start"
# The unit is MByte
-# CTDB_MONITOR_FREE_MEMORY=100
+# CTDB_MONITOR_FREE_MEMORY_WARN=100
+# CTDB_MONITOR_FREE_MEMORY=10
# When set to yes, the CTDB node will start in DISABLED mode and not host
# any public ip addresses. The administrator needs to explicitely enable
diff --git a/config/events.d/00.ctdb b/config/events.d/00.ctdb
index 9a9f3ef..4d59edc 100755
--- a/config/events.d/00.ctdb
+++ b/config/events.d/00.ctdb
@@ -38,6 +38,14 @@ case "$1" in
fi
}
+ # warn when we get low on memory
+ [ -z "$CTDB_MONITOR_FREE_MEMORY_WARN" ] || {
+ FREE_MEM=`free -m | grep "buffers/cache" | while read A B C D ;do /bin/echo -n $D ; done`
+ [ `expr "$FREE_MEM" "<" "$CTDB_MONITOR_FREE_MEMORY_WARN"` != "0" ] && {
+ echo "Running low on memory. Free:$FREE_MEM while CTDB treshold is $CTDB_MONITOR_FREE_MEMORY_WARN"
+ }
+ }
+
# monitor that we are not running out of memory
[ -z "$CTDB_MONITOR_FREE_MEMORY" ] || {
FREE_MEM=`free -m | grep "buffers/cache" | while read A B C D ;do /bin/echo -n $D ; done`
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index 04c8a07..9953715 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -5,7 +5,7 @@ Vendor: Samba Team
Packager: Samba Team <samba at samba.org>
Name: ctdb
Version: 1.0.112
-Release: 16
+Release: 17
Epoch: 0
License: GNU GPL version 3
Group: System Environment/Daemons
@@ -124,6 +124,11 @@ rm -rf $RPM_BUILD_ROOT
%{_docdir}/ctdb/tests/bin/ctdb_transaction
%changelog
+* Fri Apr 23 2010 : Version 1.0.112-17
+ - In ctdb-crash-cleanup.sh also check for and remove the NATGW address
+ if set.
+ - Add monitoring and warning of low memory condition
+ CTDB_MONITOR_FREE_MEMORY_WARN
* Thu Apr 22 2010 : Version 1.0.112-16
- Fix for a syntax error bug in 10.interfaces
- Add a ctdb-crash-cleanup-sh script that can be used
--
CTDB repository
More information about the samba-cvs
mailing list