[SCM] CTDB repository - branch master updated -
ctdb-1.0.78-14-g6c900aa
Ronnie Sahlberg
sahlberg at samba.org
Wed Apr 8 02:55:36 GMT 2009
The branch, master has been updated
via 6c900aa343096c5e1e297e055c36832ffa5028dd (commit)
via feab5f30b2d6cebf4dd28abc5a81f93424a4c852 (commit)
from a9f851caec2525ccbb3a6d6283eaef52b89a4eb2 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6c900aa343096c5e1e297e055c36832ffa5028dd
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Wed Apr 8 12:56:52 2009 +1000
new version 1.0.79
commit feab5f30b2d6cebf4dd28abc5a81f93424a4c852
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Wed Apr 8 12:49:28 2009 +1000
create a function "remote_ip" which can be used from scripts to remove a single ip from an interface.
use this fucntion from the natgw eventscript
-----------------------------------------------------------------------
Summary of changes:
config/events.d/11.natgw | 7 ++++---
config/functions | 25 +++++++++++++++++++++++++
packaging/RPM/ctdb.spec | 10 +++++++++-
3 files changed, 38 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/config/events.d/11.natgw b/config/events.d/11.natgw
index 2d256ba..1e0543d 100644
--- a/config/events.d/11.natgw
+++ b/config/events.d/11.natgw
@@ -14,16 +14,17 @@ cmd="$1"
shift
PATH=/usr/bin:/bin:/usr/sbin:/sbin:$PATH
+
delete_all() {
- ip addr add $NATGW_PUBLIC_IP dev $NATGW_PUBLIC_IFACE >/dev/null 2>/dev/null
- ip addr del $NATGW_PUBLIC_IP_HOST dev $NATGW_PRIVATE_IFACE >/dev/null 2>/dev/null
+ remove_ip $NATGW_PUBLIC_IP $NATGW_PUBLIC_IFACE
+ remove_ip $NATGW_PUBLIC_IP_HOST $NATGW_PRIVATE_IFACE
+
ip route del 0.0.0.0/0 metric 10 >/dev/null 2>/dev/null
# Delete the masquerading setup from a previous iteration where we
# were the NAT-GW
iptables -D POSTROUTING -t nat -s $NATGW_PRIVATE_NETWORK -d ! $NATGW_PRIVATE_NETWORK -j MASQUERADE >/dev/null 2>/dev/null
- ip addr del $NATGW_PUBLIC_IP dev $NATGW_PUBLIC_IFACE >/dev/null 2>/dev/null
}
case $cmd in
diff --git a/config/functions b/config/functions
index 2f0b01f..8b29fe4 100644
--- a/config/functions
+++ b/config/functions
@@ -438,6 +438,30 @@ startstop_nfslock() {
}
########################################################
+# remove an ip address from an interface
+########################################################
+remove_ip() {
+ # the ip tool will delete all secondary IPs if this is the primary.
+ # To work around this _very_ annoying behaviour we have to keep a
+ # record of the secondaries and re-add them afterwards. yuck
+ secondaries=""
+ if ip addr list dev $2 primary | grep -q "inet $1 " ; then
+ secondaries=`ip addr list dev $2 secondary | grep " inet " | awk '{print $2}'`
+ fi
+ ip addr del $1 dev $2 >/dev/null 2>/dev/null || failed=1
+ [ -z "$secondaries" ] || {
+ for i in $secondaries; do
+ if ip addr list dev $2 | grep -q "inet $i" ; then
+ echo "kept secondary $i on dev $2"
+ else
+ echo "re-adding secondary address $i to dev $2"
+ ip addr add $i dev $2 || failed=1
+ fi
+ done
+ }
+}
+
+########################################################
# load a site local config file
########################################################
@@ -445,3 +469,4 @@ startstop_nfslock() {
. $CTDB_BASE/rc.local
}
+
diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index 3bedcc6..77bb0ba 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -4,7 +4,7 @@ Summary: Clustered TDB
Vendor: Samba Team
Packager: Samba Team <samba at samba.org>
Name: ctdb
-Version: 1.0.78
+Version: 1.0.79
Release: 1
Epoch: 0
License: GNU GPL version 3
@@ -131,6 +131,14 @@ fi
%{_libdir}/pkgconfig/ctdb.pc
%changelog
+* Wed Apr 8 2009 : Version 1.0.79
+ - From Mathieu Parent: add a ctdb pkgconfig file
+ - Fix bug 6250
+ - add a funciton remove_ip to safely remove an ip from an interface, taking care to workaround an issue with linux alias interfaces.
+ - Update the natgw eventscript to use the safe remove_ip() function
+ - fix a bug in the eventscript child process that would cause the socket to be removed.
+ - dont verify nodemap on banned nodes during cluster monitoring
+ - Update the dodgy SeqnumInterval to have ms resolution
* Tue Mar 31 2009 : Version 1.0.78
- Add a notify mechanism so we can send snmptraps/email to external management systems when the node becomes unhealthy
- include 11.natgw eventscript in thew install so that the NATGW feature works
--
CTDB repository
More information about the samba-cvs
mailing list